Extract Numbers from Text
Paste any messy source, an invoice, a scraped product page, a chat log, a CSV with commentary, and get back a clean list of every number it contains. Integers, decimals, negatives and currency-style figures are recognized with a single regex pass. Output is deduplicated, one number per line, ready to drop into a spreadsheet, a calculator or a statistics tool.
How to pull numbers out of text
-
1
Paste the source
Drop in the text, no matter how dirty: surrounding words and punctuation are ignored.
-
2
Choose precision
Toggle "Include decimals" to capture `3.14`, or switch it off to extract only whole integers like `42`.
-
3
Run the extractor
Every match is pulled, unique values are kept, and you get the count of distinct numbers found.
-
4
Copy the list
One number per line, ready to paste into Excel, Numbers or any column-based tool.
What the matcher recognizes
The regex used is /-?\d+(?:\.\d+)?/ when decimals are enabled and /-?\d+/ otherwise. That covers the common numeric shapes without getting lost in locale ambiguity.
Examples of captured values
| Input | Captured (decimals ON) |
|---|---|
Total: $1299.99 after tax |
1299.99 |
Temperature dropped to -4.5C |
-4.5 |
Version 2.1.3 released today |
2.1, 3 |
IDs: 001, 042, 1007 |
001, 042, 1007 |
Score: 87% pass |
87 |
What it does not try to handle
- Thousand separators.
1,234.56is extracted as1and234.56. Clean separators first if you need the full number. - European decimal comma.
3,14is read as3and14. Swap commas for dots before extraction. - Scientific notation.
6.02e23returns6.02and23. Parse the raw source yourself if you need the exponent form. - Fractions.
1/2becomes1and2, not0.5.
Useful downstream moves
- Drop the list into a statistics tool to get mean, median and standard deviation.
- Sort and deduplicate with
sort | uniqto find the distinct values in a log. - Compare two extractions side by side to spot missing line items in an invoice.
Frequently Asked Questions
It ignores them and returns only the numeric portion. $1,299.99 becomes 1 and 299.99 because the comma is not treated as a thousands separator. Strip commas from the source if you want 1299.99 in one piece.
The regex captures the digit sequence literally, so 007 stays 007. This matters when the numbers are really IDs, part codes or zip codes rather than arithmetic values.
By default duplicates are removed so you get a clean, distinct list. If you need the raw order-preserved stream, take the source through a grep-style pipeline instead.
The text is processed inside the request and not stored after the response; your input does not persist anywhere.
Related Tools
Business Name Generator
Generate business name ideas from industry keywords and style choices, then use the checklist to verify domains, registries and trademarks.
Word Counter
Count words, characters, sentences and paragraphs with reading time, speaking time, keyword density and a Flesch readability score for essays, posts, captions and meta descriptions.
Character Counter
Count characters, words, lines, sentences and paragraphs in any text. See totals with and without spaces plus a character breakdown.
Password Generator
Generate strong random passwords with adjustable length, symbols, numbers and mixed case using cryptographic randomness.
Emoji Kitchen
Try verified Google Emoji Kitchen sticker pairs, download PNGs, and get supported suggestions when a pair is not in the curated set.
Lorem Ipsum Generator
Generate clean Lorem Ipsum paragraphs, sentences or words for wireframes, mockups and drafts. Copy in one click.
Tool available in other languages
- 텍스트에서 숫자 추출 [KO]
- ดึงตัวเลขจากข้อความ [TH]
- Extrahera nummer från text [SV]
- Getallen extraheren uit tekst [NL]
- 从文本中提取数字 [ZH]
- Wyodrębnianie liczb z tekstu [PL]
- Trích xuất số từ văn bản [VI]
- Ekstrak Angka dari Teks [ID]
- استخراج الأرقام من النص [AR]
- Metinden Sayı Çıkarma [TR]
- テキストから数値を抽出します [JA]
- Extrair Números do Texto [PT]
- Extraer Números del Texto [ES]
- Zahlen aus Text extrahieren [DE]
- Extraire des nombres du texte [FR]
- Estrai numeri dal testo [IT]
- Извлечение чисел из текста [RU]