Skip to content
1001 Tools
sr
Text tools

Add Line Numbers

Paste text and get every line prefixed with a number. Set where the count starts, how much it steps, and what separates the number from the text. Numbers are right-aligned so the text stays in a neat column, and you can zero-pad them or skip blank lines. It runs in your browser.

Numbered text

How it works

Each line receives the next number in the sequence, starting from your chosen value and increasing by the step you set. The tool measures the widest number first and pads the rest to match, so a list running from 1 to 100 keeps its text aligned instead of drifting right as the digits grow.

Zero-padding swaps the alignment spaces for leading zeros (01, 02, …), which is handy when the numbers will be sorted as text or used as filenames. “Skip empty lines” keeps blank lines in place but doesn’t number them, so the count reflects only lines with content.

Practical examples

A numbered checklist

Paste a list of tasks and get 1. Buy cement, 2. Mix mortar, 3. Lay bricks — ready to drop into a document or message.

Referencing code lines

With separator “: ” and zero-padding, a snippet becomes 01: const x = 1, 02: return x — line numbers you can quote in a review.

Starting at a different number

Set start to 100 and step to 10 to get 100, 110, 120 … useful for continuing a list that began elsewhere.

Frequently asked questions

Can I start numbering from something other than 1?

Yes. Set the start value to any whole number — including 0 or a large number — and the count begins there. Combine it with the step to continue a sequence from another document.

What does the step control?

The increment between consecutive lines. A step of 1 gives 1, 2, 3; a step of 10 gives 10, 20, 30. A step of 0 is treated as 1 so the numbers still advance.

Why are single-digit numbers padded with a space?

So the text lines up in a column. The tool pads every number to the width of the largest one; that’s spaces by default, or zeros if you enable zero-padding.

When should I use zero-padding?

Use it when the numbers need a fixed width — for filenames (page-01, page-02) or when they’ll be sorted as text, where “10” would otherwise come before “2”.

What does “skip empty lines” do?

Blank lines stay where they are but aren’t given a number and don’t advance the counter, so the numbering reflects only lines that contain text.

Can I change the separator?

Yes. It defaults to “. ” but you can set anything — a colon, a pipe, a tab-like spacing, or brackets. It’s inserted between the number and the line’s original text.

Does it handle Windows line endings?

Yes. CRLF endings are normalised, so text pasted from any platform is numbered consistently.

Is my text uploaded?

No. Numbering happens entirely in your browser; nothing you paste is sent anywhere.

Related tools