Add Line Numbers
Number every line of a text or code listing.
Input
This tool runs entirely in your browser. The data you paste or load is never uploaded.
Result
Enter your input, then run the tool.
About this tool
Prefixes each line with its number, with a choice of starting value, separator and zero padding, and can skip blank lines. Handy for quoting code in reviews, legal texts and transcripts.
How to use it
- Paste the text.
- Choose the starting number, separator and padding.
- Press Number lines and copy the result.
Frequently asked questions
Can I number only the non-empty lines?
Yes. Enable “Skip blank lines” and empty lines stay in place without a number.
How do I remove line numbers again?
Use Find and Replace in regex mode with ^\d+[.:)]?\s* and an empty replacement.
Keep going
Related tools
Sort Lines Alphabetically
Sort any list with natural and numeric ordering.
Remove Duplicate Lines
Deduplicate a list while keeping the original order.
Find and Replace Text
Replace text with plain strings or regular expressions.
Word Counter
Count words, lines and paragraphs while you type.
Character Counter
Count characters with and without spaces, plus byte size.
Sentence Counter
Count sentences and average sentence length.