Text · Made a little simpler

Add Line Numbers

Number lines in pasted text or a UTF-8 file. Set the starting number, increment, zero padding and separator, then save the result as TXT.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
Number format

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Add Line Numbers: how to use it

  1. Paste plain text or choose a local UTF-8 file.
  2. Set the starting number, increment, minimum digits and separator. Choose whether blank lines should use a number.
  3. Select Number lines. Check the first and last labels before copying the output or downloading TXT.

Limits and notes

Input is capped at 500,000 UTF-16 code units and output at 1 million. A number is added at each actual line break. The text, indentation and existing CRLF, CR or LF endings are preserved from an imported file.

How your privacy works →

Add Line Numbers: common questions

Do blank lines use up a number?

They use the next number by default. Enable Skip blank lines without advancing the count to keep empty or whitespace-only lines in place and number only the other lines.

Can I start at zero or make room for steps added later?

Set Starting number to 0 for zero-based labels. Set Increment to 10 to leave gaps between the labels.

Why did a wrapped line get only one number?

The tool numbers actual line breaks. Wrapping a long line on a narrow screen does not add line breaks to the input.

Guides