Add line numbers to text — or remove them
The Add Line Numbers tool puts a number in front of every line of your text in the format you need: “1.”, “1)”, “[1]”, “(1)”, “1:”, “001”, a tab, or your own prefix and separator such as “Line 1: ”. Set the starting number and the step, pad numbers with zeros or align them with spaces, and choose whether blank lines get a number. The result updates as you type.
It works in reverse too. Switch to “Remove numbers” to strip numbering from code copied off a website, a numbered list from a document or a transcript with numbered lines — while numbers that are part of the text, like dates and measurements, are left alone. Everything runs locally in your browser, and nothing you paste is uploaded.
How to use the Add Line Numbers
- Choose “Add numbers” or “Remove numbers” at the top.
- Paste your text into “Your text”, one item per line.
- To add numbers, pick a Format and a Padding, and set “Start at” and “Step” — for example start at 10 with a step of 10 for BASIC-style numbering.
- Keep “Skip empty lines” ticked to leave blank lines unnumbered, or untick it to number every line, as code editors do.
- Copy or download the result. In remove mode, tick the extra options if your lines use bare numbers, bullets or letters.
Add Line Numbers features
Ten formats plus custom
1. · 1) · [1] · (1) · 1: · 1 - · 1 | · 1 · tab — or any prefix and separator, such as “Step 1 – ” or “Q1: ”.
Start, step and count down
Start from any whole number, count in steps of 2, 5 or 10, or use a negative step to count down.
Zero or space padding
Pad to 01…10, fixed 001 or 0001, or right-align numbers with spaces so the text lines up neatly in monospaced fonts.
Blank lines handled your way
Skip blank lines so paragraphs and list groups are numbered continuously, or number every line for code and legal line references.
Careful number removal
Strips list and line numbering in many styles, but leaves numbers that belong to the text — such as 2024-03-14 or 1.5 kg — untouched.
Format examples
| Settings | Result |
|---|---|
| Format 1. · no padding | 1. Preheat the oven 2. Mix the flour |
| Format [1] · zeros to fit · 12 lines | [01] First line … [12] Last line |
| Format 1 · 3 digits | 001 import os 002 import sys |
| Custom “Line ” + “: ” | Line 1: Hello Line 2: World |
| Start 10 · step 10 · format 1 | 10 PRINT "HELLO" 20 GOTO 10 |
| Start 3 · step −1 · format 1) | 3) Bronze 2) Silver 1) Gold |
Which lines does “Remove numbers” change?
It removes a number at the very start of a line when it is clearly a label: followed by a full stop, bracket, colon, dash or pipe and then a space (“1. ”, “2) ”, “3: ”, “4 - ”), wrapped in brackets (“[5]”, “(6)”), written as “Line 7:” or “#8”, or followed by a tab, which is how many code viewers copy line numbers. One space after the number is removed too; any further indentation is kept.
With “Also remove numbers followed only by a space” ticked (the default), lines such as “006 text” are cleaned as well. Untick it if your lines naturally begin with a number, such as “12 apples” or “2025 was a good year”. Dates like 2024-03-14 and decimals like 1.5 are never treated as line numbers.
Practical uses
- Code reviews and teaching: number lines so people can refer to “line 14”. Use a monospaced font and space padding for neat alignment.
- Legal and academic work: line-numbered transcripts, contracts and poems make citation easy.
- Lists and steps: turn a plain list into numbered steps, then reorder it first with Sort Lines or clean repeats with Remove Duplicate Lines.
- Comparing files: numbered lines make it easier to discuss changes found with the Diff Checker.
Add Line Numbers FAQ
How do I add line numbers to text?
Paste your text, keep “Add numbers” selected and choose a format such as “1. Text”. Every line is numbered instantly; press “Copy result” to use it anywhere.
How do I number lines starting from a different number?
Type the first number in “Start at” and the gap between numbers in “Step”. For example, start at 100 with a step of 10 gives 100, 110, 120 and so on. A negative step counts down.
Can I add numbers like 001, 002, 003?
Yes. Choose “3 digits (001)” under Padding, or “Zeros to fit” to pad automatically to the width of the largest number, such as 01 to 99.
Should blank lines get a number?
For lists and paragraphs, usually not — keep “Skip empty lines” ticked and numbering continues across the gaps. For code or legal documents where every line must be referenced, untick it.
How do I remove line numbers from copied code?
Choose “Remove numbers” and paste the code. Numbers at the start of each line, with their separator and one following space or tab, are removed and the code’s own indentation is kept.
Is my text uploaded?
No. Numbering and unnumbering happen entirely in your browser, so your text never leaves your device.