Extract Integers from Data
Pull every integer out of free-form text - Smart mode handles thousand-separators and skips decimals. Free, offline, client-side, instant, secure.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
Find every integer hiding in unstructured text - sales reports, log files, emails, receipts.
Smart mode recognises thousand-separated numbers (1,234 → 1234)
and strips decimal tails ($45.99 → 45). Strict mode preserves
the original naive behaviour for opt-in compatibility.
How to Use Extract Integers from Data
- Paste your text. Anything - a report, a log line, an email, a paragraph. The output updates live as you type (200 ms debounce).
- Pick a mode. Smart (default) understands
1,234as a single integer and discards the.99tail of$45.99. Strict uses the old naive-?d+regex - every run of digits is its own integer, comma and decimal interpretation is on you. - Toggle the checkboxes. "Include negatives" (default on) recognises a minus sign only when it's NOT preceded by a digit or letter, so dates like
2024-01-15don't accidentally produce-1and-15. "Unique only" removes duplicates from the result. - Pick the output shape. List with your choice of separator, comma-separated CSV, or JSON array. JSON downloads as
.json, CSV as.csv, list as.txt. - Read the stats line. Mode, count, unique count, range (min to max), and sum.
- Copy or download. Ctrl/Cmd + Enter copies. Download saves
integers.txt/.csv/.jsondepending on format.
Frequently Asked Questions
What’s the difference between Smart and Strict modes?
Smart mode applies extra rules after the regex: thousand separators are stripped (1,234,567 → 1234567), decimal tails are dropped (45.99 → 45), and the minus sign is honored only when preceded by a non-word character. Strict mode is the original naive behaviour: every run of digits is one integer, decimals split into two integers, and any - in front of a digit run becomes a minus sign. Use Strict when you specifically want every digit cluster – Smart for everything else.
What gets extracted?
In Smart mode: thousand-separated integers (1,234,567), plain integers (42), and the integer portion of decimal numbers (45.99 → 45). In Strict mode: every run of decimal digits, plus the optional preceding minus sign. Hexadecimal (0x1A), octal (0o17), binary (0b101), and scientific notation (1e5) are not parsed as numeric literals – they’re treated as digit runs (so 0x1A → 0 and 1 in either mode).
How are negative numbers detected?
Smart mode requires the minus sign to be preceded by a non-word character (whitespace, punctuation, or start of input). So Score: -5 extracts -5, but 2024-01-15 doesn’t extract -1 or -15 because the minus signs are preceded by digits. Strict mode treats every - in front of digits as a minus sign – useful if you actually want that, mostly a footgun otherwise.
What about very large numbers?
Internally each extracted integer is parsed with parseInt, which produces a Number. JavaScript’s safe integer range is ±253−1 (about ±9×1015) – values beyond that lose precision. The output preserves whatever parseInt returned, so most real-world inputs are fine, but a 30-digit integer in your text will be rounded.
How are duplicates handled?
If “Unique only” is on, duplicates are removed via a Set (order of first appearance preserved). The stats line shows both the total count and the unique count regardless of the toggle, so you can see how many duplicates exist in your input.
What output shapes are available?
Three: List (custom separator – newline, comma, or space), CSV (comma-and-space-separated as a single line), or JSON array ([1,2,3]). The stats line and download extension adapt to the choice. JSON downloads as .json, CSV as .csv, List as .txt.
How big an input can I paste?
The regex is O(n) and the post-processing is O(matches). A 10 MB text file finishes in well under a second. The 200 ms input debounce makes typing-while-editing smooth even on large pasted inputs. The fold-based min/max means no stack-overflow on very large arrays.
Is my data uploaded?
No. The page loads three static files (HTML, CSS, JS) and then runs entirely in your browser. Your input never leaves the device – no fetch, no XHR, no analytics, no cookies. You can disconnect from the internet after the page loads and the tool still works.
Is this tool free?
Yes – free, unlimited, no signup, no watermark. The extracted integers are yours to use anywhere. Attribution to is appreciated but not required.
Related Tools
Create Image from Integers →
Visualize integer lists as barcode, pixel grid, heatmap (5 palettes), or line chart. Custom…
Analyze Integers Online and Statistical Analysis →
Analyze Integers with 30+ metrics including mean, median, mode, variance, quartiles, and more. Free,…
Calculate Sum of Integers →
Calculate the sum of integers instantly. Support for negative numbers, large integers, batch addition…
Convert Integers to Words →
Spell out integers in English - supports billions, trillions, quadrillions with BigInt precision. Free,…
Convert Words to Integers →
Convert English number words to integers (and back). Supports negatives, billions, error reporting per…
Decrement Integers →
Subtract a fixed value or percentage from each integer in a batch. BigInt support…
Destroy Integers →
Obfuscate or destroy integers in 6 ways: zero, reverse, scramble, random, noise, delete. Filter…
Enumerate Integers →
Number each integer in a list with sequential labels - standard, zero-based, custom start,…
Palindrome Number Generator →
Generate symmetric integers (number palindromes) in order, with your chosen count and separator.
Increment Integers by One →
Add one to every integer in a list and see each original number next…
Join Integers into One String →
Join a list of integers into one string, with no separator or a comma,…
Multiply Integers →
Multiply a whole list of integers together and get their exact product, even for…