Free · No sign-up · Data stays local

Line Number Tool

Add line numbers to multi-line text (custom start, step and zero-padding), or strip existing numbers automatically.

How to Use

  1. Choose the action

    Adding is the default; switch to Remove line numbers to strip existing numbering.

  2. Set the options

    For adding, set start, step, separator and padding; remove mode needs no options and auto-detects.

  3. Copy the result

    The result updates live — copy it, or feed it back to the input for further tweaks.

FAQ

Does adding line numbers change the text?

No. Numbers are prepended to each line and the original content, spaces and indentation stay untouched. The separator is just the bridge between the number and the text.

Which formats can the remover handle?

It strips a leading number followed by a dot, colon, bracket, ideographic comma, tab or one or more spaces — e.g. 1. text, 2: text, 3) text, 4、text. Leading indentation before the number is allowed too.

What is zero-padding for?

Auto-alignment makes every number the same width (padding to the largest number), so the number column lines up neatly when copied into an editor. Fixed widths suit scripts that require a specific format.

How are blank lines handled?

Blank lines are numbered and preserved, which keeps the original line positions. Use a separate text tool first if you want them removed.

More Online Tools