Text tool

Add Line Numbers

Number lines and add a prefix or suffix to each.

Free Runs in your browser

About this tool

Add Line Numbers puts a number in front of every line in your text. You can also add the same text before or after each line, for example quotes and commas to turn a list into code.

How to use Add Line Numbers

  1. Paste your lines.
  2. Choose the number format, prefix and suffix.
  3. Copy the result.

Questions people ask

How do I wrap each line in quotes?

Untick “Add numbers”, type " as the prefix and ", as the suffix. Each line becomes "item", ready for an array or SQL list.

What does zero padding do?

It adds leading zeros so all numbers have the same width, like 01 to 12. This keeps columns aligned and makes files sort correctly.

Are empty lines numbered?

Not by default. Untick “Skip empty lines” to number every line, including blank ones.

More text tools

See all 19 →
Esc