convert

Add Line Numbers

Number every line of your text with a custom starting number and separator.

Runs on your deviceBatch readyPaste textNew

Paste or drop

Paste text below, or drop a file instead.

0 chars · 0 lines
…or drop a file
Drag and drop, or choose files
TXTMDCSVTSVLOGJSONXML+10

Choose an output

Number every line of your text with a custom starting number and separator.

Fine-tune

Optional — sensible defaults are already set.

About Add Line Numbers

Put a number in front of every line of text, starting from any number you choose, with a separator of your choice between the number and the line. You can also right-align the numbers so the text lines up, and skip blank lines so they don't take a number.

When it helps

  • Numbering lines of a script, poem or transcript so people can refer to 'line 42'.
  • Adding line numbers to a code snippet for a document or slide.
  • Turning a plain list into a numbered list for an email or plain-text note.
  • Continuing numbering from a previous page by setting the starting number.

Tips

  • Type \t in the separator box to use a tab, which pastes cleanly into two spreadsheet columns.
  • 'Align numbers' pads shorter numbers with spaces on the left so 9 and 10 line up. It works best in a monospaced font.
  • With 'Skip empty lines' on, blank lines stay in place but are not counted, which suits poems and verses split into stanzas.
  • Use '. ' or ') ' as the separator for a list that Markdown will render as a numbered list.

Good to know

Quick answers about add line numbers in your browser.

Word has a line-numbering option in its layout settings, but it only shows in the document. If you need the numbers as part of the text, for an email or code block, paste the text here and copy the numbered result back.

Yes. The 'Start at' field accepts any whole number, including 0 and negative values, and counts up by one from there.

Yes. There is no sign-up, no watermark and no limit on how many files you process.

No. Files are read and processed locally in your browser, so they never leave your device.

Related tools