Add Line Numbers

Number every line of a text or code listing.

Runs in your browser Text Tools Free · No account

Input

Processed locally

This tool runs entirely in your browser. The data you paste or load is never uploaded.

Result

Enter your input, then run the tool.

About this tool

Prefixes each line with its number, with a choice of starting value, separator and zero padding, and can skip blank lines. Handy for quoting code in reviews, legal texts and transcripts.

How to use it

  1. Paste the text.
  2. Choose the starting number, separator and padding.
  3. Press Number lines and copy the result.

Frequently asked questions

Can I number only the non-empty lines?
Yes. Enable “Skip blank lines” and empty lines stay in place without a number.
How do I remove line numbers again?
Use Find and Replace in regex mode with ^\d+[.:)]?\s* and an empty replacement.

Keep going

More in this category