Add Line Numbers
Add a running line number to each line of plain text. You can start from any value, place the number before or after the line, and add your own prefix or suffix around it.
Input Text
Output Text
What It Does
Add a running line number to each line of plain text. You can start from any value, place the number before or after the line, and add your own prefix or suffix around it.
How It Works
Add Line Numbers inserts new content into each relevant lines. Position matters here. Adding something before a line, after a line, or around a value can change how the output is read downstream, even when the original content stays intact.
Insertion tools are literal. If spacing around the added content matters, include that spacing in the prefix, suffix, or inserted text itself rather than assuming the tool will add it for you.
All processing happens in your browser, so your input stays on your device during the transformation.
Common Use Cases
- Preparing pasted code for review comments in chat, docs, or tickets
- Adding stable references to interview transcripts, notes, or log excerpts
- Turning raw line-based text into numbered instructions or checklist material
- Appending record numbers to exported data where the original text must stay untouched
- Marking poem lines, script dialogue, or quotations for discussion
How to Use
- Paste the text exactly as you want it split into lines
- Choose whether the number goes before the line or after it
- Set the starting number and optional prefix or suffix
- Copy the numbered result into your document, issue, or message
Features
- Numbers every line in order, including blank ones
- Supports custom start values such as 0, 10, or 101
- Lets you format the marker with your own prefix and suffix
- Can place the number at the start or end of each line
Edge Cases
- Very large inputs can still stress the browser, especially when the tool is working across many lines. Split huge jobs into smaller batches if the page becomes sluggish.
- Empty or whitespace-only input is technically valid but may produce unchanged output, which can look like a failure at first glance.
- If the output looks wrong, compare the exact input and option values first, because Add Line Numbers should be repeatable with the same settings.
Troubleshooting
- Unexpected output often means the input is being split or interpreted at the wrong unit. For Add Line Numbers, that unit is usually lines.
- If a previous run looked different, check for hidden whitespace, changed separators, or a setting that was toggled accidentally.
- If nothing changes, confirm that the input actually contains the pattern or structure this tool operates on.
- If the page feels slow, reduce the input size and test a smaller sample first.
Frequently Asked Questions
Does this tool store or save my text?
No, all processing happens entirely in your browser. Your text is never uploaded to any server, stored, or logged. This ensures complete privacy and security for sensitive content.
Can I start numbering from something other than 1?
Yes. The Count Start field controls the first number. If you enter 25, the lines will be numbered 25, 26, 27, and so on.
What happens to empty lines?
They are counted and numbered like any other line. That preserves the original layout, which is often important for scripts, poems, transcripts, and pasted log blocks.
What do prefix and suffix do?
They wrap the generated number with your own text. For example, prefix `[` and suffix `] ` produce markers like `[7] `, while a suffix of `: ` produces `7: `.
Can I put the number after each line instead of before it?
Yes. Turn off the Before Line option and the tool will append the formatted number to the end of each line.
Does the tool align single-digit and double-digit numbers automatically?
No. It writes the numbers as plain text in sequence. If you need padded values such as 01, 02, 03, you would need a separate formatting step.