Skip to main content
100% private — runs in your browser

Add Line Numbers

Add customizable line numbers to any text or code snippet.

Input

Output

How to use Add Line Numbers

  1. Paste text

    Enter the text or snippet to number.

  2. Configure options

    Set the starting number, separator, and padding.

  3. Copy output

    Copy the numbered text.

Frequently asked questions

Is my text uploaded?

No. Line numbering runs locally in your browser.

Can I start from a specific number?

Yes. Set the starting value to any number you need.

Can I change the separator?

Yes. Customize the text placed between the number and the line content.

Does it modify the original lines?

Only by prefixing numbers; the line content itself is preserved.

Will padding work in all fonts?

Padding is most visually aligned in monospaced fonts; in proportional fonts alignment may vary.

About Add Line Numbers

The Add Line Numbers tool prefixes each line of your text with a number, making it easier to reference specific lines in discussions, reviews, documentation, or teaching materials. Customize the starting number, separator, and optional padding for neat alignment. All processing happens locally in your browser, so your content remains private and updates instantly. This is useful for sharing snippets, annotating logs, or preparing examples where line references improve clarity.

Clear references for text and code

Line numbers help readers point to exact locations in a block of text or code. Whether you are writing documentation, giving feedback, or explaining an example, numbered lines reduce ambiguity. The tool applies numbering consistently across all lines in the input, producing a clean, copyable result that you can paste into messages, documents, or issue trackers.

Customizable formatting

Different contexts call for different numbering styles. You can choose the starting value to continue from an existing excerpt, set a separator (such as ". " or ": ") to match your preference, and enable padding so numbers align vertically in monospaced displays. These options make the output easy to read without manual editing.

Fast and private

Numbering is performed entirely on your device with immediate preview. No text is uploaded or stored remotely, which is important for private code or unpublished content. Combine this tool with other text utilities—like removing empty lines or sorting—to prepare well-formatted snippets for sharing or publication.

Use Add Line Numbers on your site

This tool runs free and private in the browser. Paste it anywhere — blog posts, documentation, team wikis — and your visitors will use it without leaving your site. The embed includes a small "Made with The Tools Today" credit link.

Open the tool page →

Your privacy, your choice

We use cookies to understand how the site is used and to show relevant ads. Every tool on this site runs entirely in your browser, so the files and text you process are never uploaded. Read our privacy policy.