Adding line numbers to a block of text sounds like a tiny job, but anyone who has tried to do it by hand knows how tedious it gets. Whether you are reviewing a 200-line code snippet, preparing a printed question paper, or organising a long supplier list, referring to ‘line 14’ is far clearer than describing ‘the bit about halfway down’. The Add Line Numbers tool does this chore in one click: paste your text, and every line comes back numbered in order.
The tool is used by programmers sharing code in chats and emails, teachers numbering questions for exams and worksheets, office staff preparing numbered lists for records, and writers outlining chapters or scenes. Numbered lines make discussions precise — instead of quoting a whole paragraph, you can simply say ‘see line 22’ — and they make printed documents far easier to navigate and review with others.
Everything happens inside your browser. Your text is never uploaded to any server, so you can safely number private notes, internal documents, or draft code without worrying about who might see it. There is no sign-up, no usage limit screen, and nothing to install — the tool works on phones and computers alike, and the result can be copied straight back into your document.
You can choose how the numbers look: a dot (1.), a bracket (1)), a colon (1:), or a pipe (1 |), so the output matches the style of your document. Numbering always starts at 1 and follows the order of your lines, including blank ones. If you would rather skip empty lines, remove them first with a text cleaner and then number what remains.
How it works
The tool works in a simple, predictable way. When you paste text, it is split into individual lines wherever there is a line break. It then walks through the lines from top to bottom, attaching each line’s position number to its front — the first line becomes line 1, the second line 2, and so on. Finally it joins everything back together, preserving your original line breaks and the spacing inside each line.
The separator you pick decides the visual style: ‘1. First item’ with a dot suits formal lists, ‘1) First item’ with a bracket suits worksheets, ‘1: First item’ with a colon suits labelled data, and ‘1 | First item’ with a pipe gives a plainer look. Because the numbering is positional, you can reorder your lines and run the tool again — they will be renumbered correctly from the top.
Two things are worth knowing upfront. Numbering always begins at 1; there is no option to start at 0 or 50. And blank lines are numbered like any other line, because the tool counts line positions, not content. If blank lines would confuse your numbering, delete them before you start.
How to use this tool
- Paste or type your text into the box, with one item on each line.
- Pick a separator style: dot (1.), bracket (1)), colon (1:), or pipe (1 |).
- Click the 'Add numbers' button.
- Review the numbered output shown below the form.
- Click 'Copy result' to copy the numbered text to your clipboard.
- Paste it into your document, email, or code editor.
Practical tips
- Remove blank lines first if you do not want them numbered — a text cleaner removes them in seconds.
- Paste as plain text. Rich formatting copied from Word or web pages can carry invisible characters that shift lines around.
- Numbering always starts at 1. If your document continues an earlier list, add the offset to the numbers yourself afterwards.
- For code, keep each statement on its own line before numbering, so every number maps to exactly one statement.
- To remove numbers later, paste the result into a spreadsheet or editor and strip the first few characters of each line.
Frequently asked questions
What format do the line numbers use?
You choose the separator before converting: a dot (1.), a bracket (1)), a colon (1:), or a pipe (1 |). The number always comes first, followed by the separator and a space, then your original line text unchanged.
Can I start numbering from a number other than 1?
No. The tool always numbers from 1, since it counts each line's position from the top. If your document continues an earlier list — say it should start at 21 — add 20 to each number yourself afterwards, or number only the new section and adjust.
Do blank lines get numbers?
Yes. Every line position gets a number, including empty lines, because the tool counts positions rather than content. If you want blank lines skipped, remove them before converting; a text cleaner tool does this quickly.
Is my text uploaded anywhere?
No. The numbering runs entirely in your browser using JavaScript, and nothing you paste ever leaves your device. You can safely use it for private notes, internal documents, or draft code.
Can I remove line numbers after adding them?
The tool only adds numbers, but removing them is easy. Paste the numbered text into a spreadsheet program and use text-to-columns on the separator, or use find-and-replace with a pattern matching the start of each line. Most code editors can also strip leading numbers with one regular expression.
Is there a limit on how much text I can number?
There is no built-in limit, and everyday lists of hundreds or a few thousand lines convert instantly. Extremely large pastes — tens of thousands of lines — may take a moment on older phones, but will still complete.
Note: Numbering always starts at 1, and blank lines are numbered like any other line — clean up your text first if you want empty lines skipped.