Free online text tool

Extract Numbers from Text

Extract Numbers from Text finds every number in your text and lists each one on its own line. Paste your text, click the button and copy the result. It is free and runs in your browser.

Extract Numbers from Text

0Character Count
0Character Count (without spaces)
0Word Count
0Sentence Count
0Paragraph Count
0Line Count

Extract Numbers Example

Before
I really want to work for 5 hours, but I am too tired.
After
5

Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.

Suggest a New ToolProvide Feedback on This Tool

What does Extract Numbers from Text do?

This tool finds the numbers in your text and puts each one on its own line, in the order they appear. All the other words and symbols are removed from the result.

Whole numbers, decimals such as 3.5, numbers with thousands commas such as 1,234.50, and negative numbers such as -12 are each returned as one number. Digits joined to letters, as in abc123, are found too. A hyphen between two numbers, as in 2020-2021, counts as a range, not a minus sign.

Use it to pull the amounts out of an invoice, the figures out of a report, or the digits out of a messy string. Tick Remove duplicate numbers to list each number once.

Extract numbers from text examples

Each example shows the text before and after extracting. Duplicates are kept unless the option is ticked.

CaseBeforeAfter
Example sentence
I really want to work for 5 hours, but I am too tired.
5
Several numbers
Order 66 shipped 3 items on 12 May 2026
66
3
12
2026
Decimals and thousands commas
Total: 1,234.50 plus 3.5 tax
1,234.50
3.5
Negative numbers and ranges
Fell to -12 from 5, years 2020-2021
-12
5
2020
2021
Numbers inside words
abc123def45
123
45
Duplicates kept (default)
1 2 1 2
1
2
1
2
Duplicates removed (option on)
1 2 1 2
1
2

How to extract numbers from text

  1. 1
    Add your text
    Paste your text into the box, or import a text file.
  2. 2
    Choose duplicates
    Leave Remove duplicate numbers unticked to keep every number, or tick it to list each number once.
  3. 3
    Click Extract Numbers
    Every number is found and put on its own line. Use Undo if you change your mind.
  4. 4
    Copy it
    Click Copy and paste the list where you need it.

When to extract numbers

Good for

Pulling amounts, quantities and figures out of invoices, reports, logs and messy strings, and building a clean list to sum, sort or import into a spreadsheet.

Check first

Every group of digits counts as a number, so dates, times and phone numbers are split into their parts (10:30 gives 10 and 30). Numbers are returned as written and are not added up. The result replaces your text, so use Undo if you need the original.

Other tools

To delete the numbers instead try Remove Numbers From Text. To split text and numbers try Separate Numbers from Text.

Extract numbers from text FAQ

What does the Extract Numbers from Text tool do?

It finds every number in your text and puts each one on its own line. All the other words and symbols are removed from the result.

How do I extract numbers from text?

Paste or type your text, or import a text file, then click Extract Numbers. The numbers replace the text in the box. Click Copy to use them, or Undo to go back.

Does it find decimals and negative numbers?

Yes. A number such as 3.5 is returned as one number, and a number with a minus sign right before it, such as -12, keeps the minus. A hyphen between two numbers, as in 2020-2021, is treated as a range, so you get 2020 and 2021.

What happens to numbers with commas, such as 1,234.50?

A number written with thousands commas is returned as one number and keeps its commas, so 1,234.50 stays 1,234.50.

Does it find numbers inside words?

Yes. Every group of digits is returned, even when it is joined to letters. In abc123def45 you get 123 and 45.

Does it remove duplicate numbers?

Not by default, so every number is listed in the order it appears. Tick Remove duplicate numbers to list each number only once.

What if my text has no numbers?

The text is left as it is and you see the message No numbers found.

Is this tool free and is my text private?

Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server.

Looking for more text tools?

Browse Extract Tools

Last updated: 9 November 2026