To extract numbers from text string data, scan the string for numeric tokens and return each match separately or as summary statistics. That sounds simple, but the reliable version depends on explicit rules: a hyphen can be punctuation rather than a minus sign, commas can divide digits, and identifiers can contain numbers that still need to be found.
The Extract Numbers from Text tool applies a defined grammar to pasted content and returns either extracted values or statistics. It works with invoices, reports, log files, survey exports, and other mixed text, without uploading or storing the pasted source.

What the scanner counts as a number
Numbers embedded in other text are extracted wherever they occur. For example, item123 yields 123, $19.99 yields 19.99, and 50% yields 50. The extractor finds numeric content without deciding whether it represents a price, percentage, identifier, measurement, or another kind of value.
Integers and decimals are recognized by default, including negative values, a leading plus sign, and bare decimals written without a leading zero. The important exceptions and adjustments are controlled by explicit switches rather than an attempt to guess what the source intended.
| Input situation | Documented behavior | What to verify |
|---|---|---|
| Negative values and plus signs | Negative numbers and values with a leading plus are recognized by default. | Check that signs represent numeric values rather than punctuation between numbers. |
| Minus sign in an expression | A minus is retained only in a recognized position, such as when genuinely attached to the number, at the start of a line, after whitespace, or after an opening bracket or comparison. | Confirm that 5-3 should produce two positive values rather than 5 and -3. |
| Decimals | Decimals are recognized by default, including bare decimals without a leading zero. | Inspect decimal points that may be sentence punctuation or part of another format. |
| Thousands separators | Well-formed grouping is understood, so 1,000,000 is one number rather than three fragments. | Make sure the separator setting matches the source; turning it off extracts literal digit runs. |
| Scientific notation | Scientific notation has its own switch and is off by default. | Enable it only when forms such as 1e5 are intended as numbers. |
| Repeated values | The de-duplication switch can collapse repeated values while preserving first-seen order. | Leave it off if every occurrence needs to remain in the output. |
This rule-based approach is also why the result should be audited rather than treated as an interpretation of the document. The output tells you what matched the enabled grammar; it does not explain what each number means.
Extract the string in three actions
- Paste the text containing the numbers you want to extract. Include the complete source string, including labels, identifiers, punctuation, line breaks, and surrounding prose. Do not add separators that were not present if the goal is to reproduce the source’s own numeric pattern.
- Adjust the rules when the source requires it. Review the controls for signs, thousands separators, scientific notation, and de-duplication. Scientific notation is off initially, while well-formed thousands grouping is handled as a grouped value. Change a setting only when it reflects the format you intend to extract.
- Choose list or statistics output. A list can present the extracted values one per line or as comma-separated output. Statistics provide the count, sum, minimum, maximum, and average.
- Check the found count, inspect the matches, and copy the result. The found count appears for every extraction, allowing a quick comparison with your expectation. If no numbers are recognized, the result reports exactly that rather than treating the input as an error.
This workflow preserves the practical goal of the task: remove numeric content from a larger string without needing to redesign or manually parse the surrounding text.
Choose the output that matches your next task
A list is the most useful format when you need to inspect or transfer each match. Statistics are better for a quick check of the total and range. The choice changes the presentation, not the underlying extraction rules.
| Output option | Best suited to | What it provides |
|---|---|---|
| Number list, one per line | Reviewing individual matches in extraction order | Each extracted value on its own line |
| Comma-separated list | Moving values into a delimiter-based workflow | The extracted values joined with commas |
| Statistics | Checking the size, total, and spread of the extracted set | Count, sum, minimum, maximum, and average |
The statistics view is a summary of recognized values, not a semantic classification of the document. A sum can describe the extracted tokens, but it cannot tell you whether those tokens were all invoice totals, all percentages, or a mixture of unrelated figures.
Audit signs, separators, and notation
Check the sign boundary
The sign rule is deliberately narrower than simply treating every hyphen before a digit as a negative sign. In 5-3, the minus sits between two numbers and is read as an operator, so the result contains 5 and 3. A recognized negative position includes a genuinely attached minus, the start of a line, a position after whitespace, or a position after an opening bracket or comparison. This reduces the chance of turning an arithmetic expression into an incorrect negative value.
Check how commas are grouped
With the thousands-separator rule enabled, a well-formed value such as 1,000,000 remains one number. Malformed grouping splits at the point where the grouping becomes invalid. If the source uses commas in another way, turn the separator rule off and the extractor will look for literal digit runs instead. The setting should match the data rather than an assumption that every comma is a thousands marker.
Enable scientific notation only when intended
Scientific notation is off by default because a token such as 1e5 in ordinary prose can be a typo or an identifier rather than a number in scientific form. If the source is known to use scientific notation, enable the corresponding switch so those candidates are included under the intended rule.
Decide whether duplicates matter
De-duplication is useful when repeated values obscure the unique set you want to work with. When enabled, it collapses repeated values and keeps the first occurrence in the output order. Leave the switch disabled when every occurrence carries useful context or must remain visible in the extracted list.
Use the found count as an audit signal
Every extraction reports how many numbers were found. Use that count as a quick control before copying: compare it with the number of numeric values you expect from the source, then inspect the list for unusual signs, split groups, or missing decimal portions. The count is exact, including when the input contains no recognizable numbers.
The summary statistics use ordinary JavaScript double-precision arithmetic. As a result, a sum of otherwise clean decimals can display a very small floating-point residue near the fifteenth significant digit. This is a precision limit rather than evidence that the underlying scan missed a value. The count remains exact, and the residue is not expected to affect earlier significant digits.
When a result looks incomplete, revisit the rules before changing the source text. A missing scientific-notation value, a wrongly interpreted sign, or a separator setting that does not match the input can all alter the count while leaving the pasted string unchanged.
Separate extraction from interpretation
The tool deliberately stops at numeric content. It does not perform currency conversion, identify units, parse dates, or guess whether a value is a price, quantity, identifier, or measurement. Those tasks require context that may not be present in the string itself.
For example, extracting 19.99 from a currency label does not establish which currency is used. Finding a year-like number does not make it a date, and finding several measurements does not convert them to a common unit. Once the values are extracted, use the surrounding document or another dedicated process when that interpretation is required.
This boundary makes the result easier to audit. The rule set explains how a token was selected, while business meaning remains a separate decision.
Know the input and privacy boundaries
The extractor recognizes ASCII digits only. Full-width digits and numerals written in other scripts are not half-supported: they pass through unextracted. If a source relies on those characters, convert or transliterate the relevant digits before extraction, then verify the found count again.
The accepted input is capped at one million characters. The text is processed in a single linear pass, so long pastes follow a defined scanning method rather than a multi-stage interpretation process. If the source exceeds the cap, work with a smaller section and combine the reviewed results separately.
Processing takes place entirely in the browser. The pasted text is not uploaded, stored, or attached to an account. That makes the tool suitable for temporary cleanup of local invoice text, report excerpts, logs, and survey exports while keeping the source under your control.
Run a final pre-copy check
- Confirm the rule settings: Check signs, thousands grouping, scientific notation, and de-duplication against the source format.
- Choose the intended output: Use a list for individual values or statistics for a numerical summary.
- Compare the found count: Treat a mismatch as a prompt to inspect the rule choices, not as proof that the document contains the wrong values.
- Scan the results: Look for unexpected minus signs, split thousands groups, repeated values, and candidates that resemble identifiers.
- Copy only after review: The resulting list or statistics are ready to move into the next stage of your workflow.
A dependable extraction comes from combining a fixed grammar with a deliberate review of its output. The scanner handles the repetitive search; the found count, rule switches, and final inspection make the result auditable.