EditSafely

Add Line Numbers

Prefix every line with a sequential number. Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

Options

How to use Add Line Numbers

  1. 1. Paste your lines. Enter the list or block of text you want numbered into the input pane, one entry per line.
  2. 2. Set Start at and Separator. Start at picks the first number used, for example 0 or 1. Separator is what goes between the number and the line text, such as a period and space or a colon.
  3. 3. Choose whether to pad numbers. Turn on Pad numbers to equal width so single-digit and double-digit numbers line up visually, adding a leading zero or space where needed so the list stays aligned.
  4. 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. Pad the numbers if the snippet is over 9 lines.
  • 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 3 settings, including Start at, Separator and Pad numbers to equal width, 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 keystroke 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,658 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. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

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.

Related tools

All Text Tools