Remove Numbers

Take out every digit, only the whole numbers so mp3 and H2O keep theirs, or just the “1.” that opens each line of a pasted list.

Runs 100% in your browserNothing is uploaded to a serverInstant results

Options

Also clean up

Each of these runs the same code as its own page. The full set, all switched on at once, is the text cleaner.

Input

Result

Copied!

Before and after

0
Characters in
0
Characters out
0
Characters removed
0
Words in → out

Three different things people mean by “remove numbers”

The mode select is here because the request is ambiguous and getting it wrong is destructive. Every digit is the literal reading: every 0–9 in the text goes, wherever it sits. That is what you want for a raw frequency count or when the digits are noise from an OCR pass, and it is also what turns mp3 into mp and H2O into HO, so it is not the default reading for prose.

Whole numbers only is the mode to switch to the moment the text is prose rather than data. It removes a run of digits when the run stands on its own as a token — a year, a quantity, a price, an invoice number — and leaves alone any digit that is welded into a word. mp3, H2O, A4, MP4, IPv6 and Windows 11 all come through intact. The boundary test looks at the character on each side, so 3.5kg is treated as a word rather than as the number 3.5, and a trailing full stop is handed back to the sentence rather than swallowed with the number.

Only the numbering at the start of a line is the narrow one, and it solves a specific annoyance: a numbered list copied out of a PDF, a Word document or a web page arrives as literal text, so every line starts with 1., 2) or (3) and pasting it into an editor that does its own numbering gives you two sets. This mode strips exactly that prefix and touches nothing else on the line — the dates, prices and quantities in the body of the list survive.

The currency checkbox is off by default because £, €, $ and % are not digits and this page is about digits, but removing 1,240 from “€1,240.00” already leaves a bare € behind. Ticking it clears those up too. Numbers written as words — “twenty”, “third”, “half” — are not touched by any mode; recognising those is a language problem rather than a character problem, and pretending otherwise would quietly delete the wrong words.

A numbered list pasted out of a PDF

Pasted in
1. Export the mp3 files from the 2024 archive.
2. Check the H2O readings.
Comes out
Whole numbers only:
. Export the mp3 files from the  archive.
. Check the H2O readings.

Only the line numbering:
Export the mp3 files from the 2024 archive.
Check the H2O readings.

Numbers questions

How do I strip years and prices but keep mp3 and H2O?

Use “whole numbers only”. A run of digits is removed when nothing but a letter-free boundary sits on either side of it, so a year, a quantity and an invoice number all go while any digit attached to letters stays put. That covers mp3, H2O, A4, MP4, Windows 11 and IPv6 without a list of exceptions, and it also leaves 3.5kg alone because the letters immediately after it make it a word rather than a number.

Can I remove the 1. 2. 3. from a list without touching the rest?

Yes, that is the third mode. It matches only a leading number with its dot, bracket or colon and the whitespace after it, once per line, at the start of the line. Everything else on the line is untouched, so a list of dated entries keeps its dates. It handles “1.”, “2)”, “(3)” and “4:”, with or without leading indentation.

Does it remove numbers written as words?

No. “Twenty”, “third” and “dozen” are ordinary words and stay exactly where they are. Detecting them reliably needs language rules rather than character rules — “one” is a number in “one box” and a pronoun in “the blue one” — and a tool that guessed would silently delete words you meant to keep.