Remove Line Numbers

Paste text where each line begins with a number and this tool deletes the numbering. For every line it removes any leading spaces, the number, and the single separator right after it, a period, a colon or a tab, plus one optional space. So 1. First line becomes First line, 12: value becomes value, and a tab after the number works too. Lines that do not start that way are returned untouched.

How it works

  1. 1

    Paste the numbered text

    Drop in code, a list, a transcript or anything where each line starts with a number.

  2. 2

    Remove the numbers

    Press the button and the leading number plus its separator is removed from every line in one pass.

  3. 3

    Check the result

    Lines without a leading number are left alone, and blank lines stay blank.

  4. 4

    Copy the clean text

    Copy the output straight into your editor, document or spreadsheet.

Which separators it recognises

For each line the tool removes a leading run of: optional spaces, one or more digits, then exactly one separator, a period (.), a colon (:) or a tab, then one optional space. That covers the most common ways code and documents number their lines.

Format Example input Result
Period 1. text text
Colon 1: text text
Tab 1 + Tab + text text
Zero-padded 001. text text
Leading space 12. text text

What it leaves alone

The separator has to be a period, a colon or a tab. Anything else is not treated as numbering, so these lines pass through unchanged:

Line Result (unchanged)
1 text 1 text
1) text 1) text
text 1 text 1

A plain space after the number, a closing parenthesis, and numbers on the right-hand side of the line are all left in place.

One thing to watch for

The tool looks only at the start of each line, so a line that genuinely begins with a decimal can be affected: 12.5 apples is read as the number 12 followed by a period, and comes out as 5 apples. Run it only on text whose lines are really numbered.

A typical workflow

Copying a snippet from a PDF, a slide or a Stack Overflow answer often drags the line numbers along. Paste it here, remove the numbering, then send the result through a code formatter such as prettier, black or gofmt if the indentation also needs tidying.

Frequently Asked Questions

A period (.), a colon (:) or a tab immediately after the number. A plain space or a parenthesis is not treated as a separator, so 1 text and 1) text are left unchanged.

Any spaces before the number are removed along with it. Lines that do not start with a recognised number and separator are returned exactly as they were, so their indentation is kept. The tool does not re-indent code for you.

No. Only leading numbering on the left is removed. A line like text 1 is left unchanged.

The tool sees 12. as a number and a period and removes it, leaving 5 apples. Only run it on text whose lines are genuinely numbered.

On our server. Only the number of lines is recorded for analytics, never the text itself.

Related Tools

Tool available in other languages