Number Lines Tool
Prefix every line with its line number.
Result
How it is calculated
The tool splits the text into lines wherever it finds a line break (Windows, Unix and old Mac line endings are all recognised) and puts a running counter in front of each line: line n → "n. " + text. Numbering always starts at 1 and increases by 1, followed by a full stop and a space. Blank lines are also numbered and counted, so an empty line in the middle still takes a number. The original text of each line is left untouched, including spaces at its start. If the box is empty there is no result. The output keeps one numbered line per input line, ready to copy and paste.
Worked example
Input of three lines: Milk, Bread and Eggs. Line 1 gets the prefix "1. ", line 2 gets "2. " and line 3 gets "3. ". The tool returns 1. Milk 2. Bread 3. Eggs with each numbered item on its own line. If you add a blank line between Bread and Eggs, Eggs becomes number 4, because the empty line is counted too.
Common mistakes
- Expecting a blank line to be skipped. It receives a number, which shifts everything after it.
- Pasting a text that is wrapped by the editor and expecting numbers per sentence. Only real line breaks start a new number, not wrapped lines.
- Trying to change the starting number or the separator. The tool always uses "1." style numbering.
- Numbering text that already has numbers or bullets, which ends up with double prefixes.
About this calculator
This tool adds a sequential line number as a prefix to every line of a block of text, turning an unnumbered list or block of text into one where each line's position is immediately visible, without manually counting or typing numbers one by one. It preserves the original line order and content, simply prepending the count.
It is used by developers and writers who need to reference specific lines when discussing a piece of text, a config file, or a code snippet — saying "see line 14" only works if the lines are actually numbered. It's also handy for numbering steps in an instruction list, items in a to-do list, or entries in any plain-text list pasted from somewhere that stripped the original numbering.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Check the end of your result when you paste text copied from a file or an email. If the original ends with a line break, the tool treats what follows as one more line and adds a final empty numbered entry, such as 4. with nothing after it. Delete that stray last line before using the list. Numbers here are plain text, so they will not renumber if you reorder lines later. What are you numbering?