Text & writing

Add line numbers

Number text lines with a custom start and separator.

Add line numbers
Esc to restore

Your inputs

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Normalises line endings to LF and prefixes each line, including blank lines, with its line number and the literal separator. Supports up to 50,000 lines and does not interpret markup.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Text
First line
Second line
Third line
First line number
1
Separator
:

Example result

1: First line
2: Second line
3: Third line