Add Line Numbers
Number each line of a block of text. Pick the first number, the separator style, optional zero-padding to a fixed width, and whether blank lines are skipped or numbered.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
A running number in front of every line
Paste a block of text and each line comes back prefixed with a number. Start number sets the first value, Separator picks the style — "1. ", "1 | ", a tab, "1) " or "1: " — and Zero-pad to equal width pads the prefix with zeros so every number takes the width of the largest one printed.
Quoting lines back to someone
It is the tool for turning a pasted log, a config file or a stack trace into something you can refer to line by line in a code review, a support ticket or a bug report, and for preparing a numbered procedure in prose.
The two switches
Skip blank lines leaves empty lines exactly where they are but does not number them and does not advance the counter, so the numbering tracks content rather than rows. Zero-pad derives the width from the highest number that will actually be printed, so a run from 1 to 9 stays single-digit while a run to 120 becomes three digits wide.
Caveats
Lines are split on newline only, so a file with old Mac-style CR-only endings is treated as one long line. A file ending in a newline has a final empty line, numbered or skipped per the blank-line setting. The counter never restarts inside a block.
Numbered in the page
The text is transformed in your browser and nothing is uploaded, so numbering a file full of internal paths, configuration values or customer data is safe — and it works offline.
Questions
What happens to blank lines when "Skip blank lines" is on?
They stay exactly where they are but get no number, and they do not advance the counter.
How wide is the zero-padding?
The width of the largest number that will be printed, so every prefix lines up.
Can I number only part of a file?
Paste just the range you want numbered, or number everything and delete the lines you do not need. There is no "start after line N" rule: the counter simply begins at the Start number you set.
Related tools
See categoryRemove Empty Lines
Strip blank and whitespace-only lines, collapse blank runs to one, or trim trailing blanks.
Sort Lines
Sort lines alphabetically, numerically, by length, naturally, or shuffle them.
Remove Duplicate Lines
Delete repeated lines from a list, keeping the first or last occurrence.
Find and Replace
Replace text by plain string, whole word, or regular expression, with optional case folding.