Add Line Numbers

Prefix every line with a sequential number — pick the start, step, separator, and alignment. Runs in your browser; nothing is uploaded.

Numbered text

About this tool

Add Line Numbers prefixes every line of your text with a sequential number — the same job as nl or cat -n, but right in your browser.

Everything runs locally in your browser via WebAssembly — your text is never uploaded.

Handy for

FAQ

Can numbering start at 0 or a negative number?

Yes. Start number accepts any whole number, including 0 and negatives, so you can produce 0, 1, 2… or -2, -1, 0…. Only the step is restricted: it must be at least 1 (a step of 0 or a negative step is rejected with an error). Alignment still works with negative starts — the minus sign counts toward the column width.

How do I get 10, 20, 30 style numbering?

Set Start number to 10 and Step to 10. The first line gets 10, the second 20, and so on. Any start/step combination of whole numbers works, e.g. start 100, step 5 gives 100, 105, 110….

What is the difference between the spaces, zeros, and none alignments?

They control how numbers are padded to a common column width, which is the width of the largest number in the output. Spaces right-aligns ( 9, 10), zeros left-pads with zeros (09, 10), and none writes each number as-is (9, 10), so columns may not line up past line 9.

How does "skip blank lines" treat lines that contain only spaces?

With Skip blank lines enabled (the cat -b behavior), any line that is empty or contains only whitespace is passed through unchanged — it gets no number and doesn't consume one, so the next non-blank line continues the sequence. The result also reports how many of the total lines were numbered.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool add-line-numbers "Paste text to number…"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/add-line-numbers/?text=Paste%20text%20to%20number%E2%80%A6&start=1&step=1&separator=tab&pad=spaces&number_nonblank=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.