Add line numbers

Turn any list into a numbered list ready to paste into a message, document or code.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter text, start at, separator after the number, zero padding (01, 02) and skip empty lines.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Line k gets the number (start + k - 1), followed by the separator and the line. With zero padding every number is filled to the width of the largest one.

Example

Inputs: Start at = 1, Separator after the number = 1. dot, Zero padding (01, 02) = no, Skip empty lines = no. Result: Result: 1. Open the file 2. Choose the pages 3. Save the result; Lines numbered: 3.

Open the file
Choose the pages
Save the result
1. Open the file
2. Choose the pages
3. Save the result

Limits and caveats

  • A long line that only wraps on screen counts as one line, because numbering follows real line breaks.
  • Numbers use Western digits 0 to 9.

Questions about this tool

Can numbering start at something other than 1?

Yes. Enter any start number from 0 up and counting continues from there.

Why use zero padding?

It gives every number the same width, like 01 and 10, so the list lines up and sorts correctly as text.

What happens to blank lines?

By default they are numbered like the rest. With skip on they stay blank and get no number.