Remove Line Numbers

Paste numbered text and press Remove line numbers. Common formats are detected automatically, or set the characters before and after the number yourself.

Try an example
Format presets

Leave both empty to detect common formats automatically. Type \t for a tab.

About this line number remover

Code copied from an editor, a tutorial, or a PDF often brings its line numbers along, and numbered lists and log files carry numbers you may not want. This tool removes the number at the start of each line and leaves the rest of the line alone, including the indentation that code depends on. It recognizes the common formats on its own: 1. 1: 1) 1] [1] (1) #1, and numbers followed by a tab or a space. For anything else, such as "Line 12:", type the characters that come before and after the number.

How to remove line numbers

  1. Paste the numbered text. Paste code, a log, or a list, or press an example. An example only fills the box.
  2. Set the format if needed. Leave the fields empty for automatic detection, press a preset, or type what comes before and after the number.
  3. Press Remove line numbers. The text appears below without numbers, with a count of the lines that changed.
  4. Copy or download. Press Copy text, or Download to save the cleaned text.

Frequently asked questions

Is the indentation of my code kept?

Yes. Only the number, its punctuation, and one space or tab after it are removed. Any further spaces stay, so "2. return x" becomes " return x".

Which formats are detected automatically?

With both fields empty: 1. 1: 1) 1] [1] (1) #1, a number followed by → or a tab, and a number followed by a space and more text. Numbers in the middle of a line are never touched.

How do I remove a format like "Line 12:"?

Type "Line " (with the space) in Before the number and ":" in After the number. Only lines that start with that exact pattern change.

Could it remove a number that is part of my text?

In automatic mode, a line that starts with a number and a space, such as "3 apples", loses the 3. Choose a preset such as "1. text" to match only numbers followed by that exact punctuation.

How do I match a tab after the number?

Press the tab preset, or type \t in After the number.