Add Line Numbers
Prefix every line with a sequential number. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
Output
Prefix every line with a sequential number.
Type or paste above to see the result here.
What you paste never leaves this tab
Add Line Numbers is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, the text you paste is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use Add Line Numbers
- 1. Paste your lines. Enter the list or block of text you want numbered into the input pane, one entry per line.
- 2. Pick a Format and Start at. Tap a Format chip such as 1. or 1) or Tab to choose what follows each number. Start at picks the first number, for example 0 or 1.
- 3. Choose Padding and Skip empty lines. Padding Spaces or Zeros keeps short and long numbers aligned (Zeros gives 01, 02). Turn on Skip empty lines to leave blank lines unnumbered. A final newline is kept but never numbered.
- 4. Copy the numbered list. Copy the result from the output pane, where every line now begins with its sequential number and your chosen separator.
When to use Add Line Numbers
Add Line Numbers prefixes every line of text with a sequential number, with control over the starting number, the separator and whether numbers are padded to equal width. Use it whenever a list needs visible ordering.
- Numbering steps in a how-to guide. You've drafted a list of instructions as plain lines and want them to read as numbered steps before pasting into documentation. Set the separator to a period and space.
- Preparing a code snippet for review. You're sharing a short code excerpt in a message and want line numbers so a reviewer can reference 'line 12' precisely. Keep Padding on Spaces so numbers line up past line 9.
- Creating a numbered reference list. A bibliography or footnote list needs sequential numbers before each entry. Choose a starting number other than 1 if the list continues from a previous section.
Examples
Number three lines
Input
apple banana cherry
Output
1. apple 2. banana 3. cherry
About the Add Line Numbers tool
Add Line Numbers is a free online tool that works entirely inside your web browser. Prefix every line with a sequential number. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.
This page is one of 211 Text utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.
You can shape the output with 4 settings, including Format, Start at, Padding and Skip empty lines, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.
Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every step is handled on your own machine rather than by a remote API.
Frequently asked questions
Does Add Line Numbers cost anything?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.
How much text can I process at once?
There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
Do I need to sign up or install anything?
Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.