Tools

Add Line Numbers

Number every line of text or code

How to add line numbers

  1. Paste your text, list or code.
  2. Press the highlighted Number lines button. Each line is numbered in order, starting from 1.
  3. Copy the numbered text and paste it wherever you need it.

Why number lines?

Line numbers make text easy to discuss. When you send a contract clause, a poem, a script or a block of code to someone, they can reply "see line 14" instead of quoting a sentence. Teachers number lines in reading passages for comprehension questions, lawyers and editors number lines for reviews, and transcribers number lines in interview transcripts. Numbered steps also turn a plain list into a ready-made ordered list for emails and chat apps that do not support formatting.

Numbering is added as plain text, so it survives being pasted anywhere. If you need to remove numbers later, the Find and Replace tool with a regular expression such as ^\d+\.\s* strips them in one step. Other operations on this page let you add any prefix or suffix to every line, for example bullet characters, quotes or commas.

Your text never leaves your browser.

FAQ

Are empty lines numbered?

Yes, every line gets a number so the numbers match line positions in the original.

Can I add bullets instead of numbers?

Yes. Use the prefix option and type a bullet such as • followed by a space.

How do I number lines in Word?

Use Layout > Line Numbers, or paste here for plain-text numbering you can copy anywhere.