<link rel="stylesheet" type="text/css" href="/mirawhite.css">

Extract numbers from text

Paste an invoice, a report or a table copied from a web page: every number is listed on its own line, without thousands separators, ready to paste into a spreadsheet. Free, no sign-up.

Free, no sign-up, no limit Runs in your browser: your text and files are never sent or saved.

Extract numbers from text

Options

How to use it

  1. Paste the text that contains the numbers.
  2. Check how numbers are written in it (1,234.56 in English, 1 234,56 in French) and the format you want for your spreadsheet.
  3. Copy the column of numbers, or read the sum, mean, minimum and maximum under the result.

Example

Input

Order #42: 3 boxes at $1,234.50 each, discount -15%, shipping 9.99

Output

42
3
1234.50
-15
9.99

Good to know

  • With the English convention, a comma separates thousands (1,234) and a point marks decimals. A French text read with this convention gives wrong numbers: switch the convention.
  • A minus sign counts only when it is not attached to a word or a number: “10-12” gives 10 and 12, and a date such as 2026-05-01 gives three numbers.
  • Numbers stuck to a letter, such as mp3 or A4, are skipped. Phone numbers are split into groups.
  • Currency symbols are dropped: $1,234.50 gives 1234.50. Percentages are kept as numbers (15% gives 15) unless you keep the % sign.

Frequently asked questions

How do I extract numbers from a cell in Excel?

Excel has no simple function for it: Microsoft 365 formulas that combine MID, SEQUENCE and TEXTJOIN keep the digits but glue every number together. Copy the cells and paste them here instead: each number comes out on its own line, with its decimals, ready to paste back into a column.

How do I add up the numbers in a text?

Paste the text: the sum, mean, minimum and maximum of all the numbers found appear under the result. It is a quick way to total the amounts of an invoice or a bank statement pasted as text.

Does it handle prices, percentages and negative numbers?

Yes. Currency symbols are dropped ($1,234.50 gives 1234.50), percentages are kept as numbers (15% gives 15, or 15% if you keep the sign), and a minus sign counts when it is not attached to a word: “-15” is negative, while “10-12” gives 10 and 12.

Why are my numbers wrong with a European text?

In a text written as 1 234,56 the comma is the decimal mark. Switch “Numbers in the text” to the French convention so 1 234,56 is read as 1234.56, and pick the output format your spreadsheet expects (point or comma).

How do I extract numbers from a PDF or an image?

For a PDF with selectable text, copy it (or use “Extract text from PDF”) and paste it here. For a scan or a photo, run “OCR PDF” first to turn the image into text. In Python, re.findall(r"-?\d+(?:\.\d+)?", text) is the basic equivalent.

← Back to all tools