Menu

Extract Phone Numbers from Text

Paste any text and the phone numbers in it appear in the result box, one per line, with duplicates removed. US and international formats are found; dates, IP addresses, version numbers and short order numbers are skipped.

0 words 0 characters 0 lines

Continue with this text: Extract emailsRemove duplicatesComma list

Your text stays in your browser: nothing is uploaded or stored on a server.

How to use it

  1. Paste your text into the box, or use Open file for a .txt, .csv or other plain-text file. Example loads a short sample with three countries and a few numbers that are not phone numbers.
  2. Choose the Output: As written, Digits only or International (+ format); 10-digit numbers are taken as US/Canada.
  3. Leave Remove duplicates ticked to list each number once, and tick Sort to order them.
  4. Choose One per: Line, Comma or Semicolon.
  5. Press Copy, or Download .txt. The status line shows how many numbers are in the result.

The result updates as you type. The sample gives this, one per line:

(555) 123-4567
+1 555 987 6543
+44 20 7946 0958
+34 612 34 56 78

The order date 2026-10-21, the reference 48213 and the version 2.4.1 in the same sample are left out.

What counts as a phone number

The extractor looks for numbers written the way people write them in email signatures, web pages and spreadsheets: groups of digits joined by single spaces, dots or hyphens (including the en dash that word processors insert), with optional brackets around a group and an optional leading + or 00. Then it applies these rules:

  • 7 to 15 digits. A leading 00 is not counted. Fifteen is the most an international number can have under the ITU E.164 numbering plan; seven is the shortest common local number, such as 555-1234.
  • Unbroken digit runs need a reason. 5551234567 (10 digits) and 07946095800 (11 digits) are taken, as is anything starting with + or 00 such as +4930123456. A plain run of another length, such as 48213 or 123456789012, is treated as an order number, amount or ID.
  • Dates, IP addresses and versions are rejected. 2026-10-21, 21.10.2026, 10-21-2026, 192.168.100.200, v10.15.7 and version 1.2.3.4 give nothing. Times like 12:30 never match, because a colon is not a separator.
  • Extensions are dropped. 555-123-4567 ext. 12 and 555-123-4567 x12 both give 555-123-4567. A single trailing digit is cut too, so 555-123-4567 2 times gives the number alone.
  • Numbers inside other text are skipped. A number glued to letters or a # (ID#5551234567, ISBN 978-0-306-40615-7) is not taken. A tel: prefix is fine: tel:+15551234567 gives +15551234567.
  • Trailing punctuation is left out. Call 555 123 4567. and +1-555-123-4567, give the number without the period or comma.
  • Postal codes, SSNs and card numbers are rejected. A ZIP+4 code (02139-4307), a number shaped like a Social Security number (123-45-6789) and a card number (4111 1111 1111 1111, four or more groups of four digits) give nothing.
  • Numbers separated only by a space are split when the first is a North American number or both have the same shape. 555 123 4567 555 987 6543, (555) 123-4567 (555) 987-6543 and 020 7946 0958 020 7946 0959 each give two numbers. 1.555.123.4567 is found like 1-555-123-4567.

Line breaks always end a number, so a phone list with one number per line stays separate, and so do cells separated by commas or tabs in a CSV.

The three output formats

Written in the text As written Digits only International (+ format)
(555) 123-4567 (555) 123-4567 5551234567 +15551234567
1-800-555-0199 1-800-555-0199 18005550199 +18005550199
+44 20 7946 0958 +44 20 7946 0958 +442079460958 +442079460958
0049 30 1234567 0049 30 1234567 0049301234567 +49301234567
020 7946 0958 020 7946 0958 02079460958 02079460958
+44 (0)20 7946 0958 +44 (0)20 7946 0958 +442079460958 +442079460958

Digits only removes spaces, brackets, dots and hyphens but keeps a leading +. A (0) written after a country code is a trunk prefix that is not dialled from abroad, so Digits only and International leave it out; As written keeps it. The International option produces the E.164 style, a + followed by digits only, which is what most CRMs, SMS services and spreadsheets want, but only when the country is clear from the text:

  • the number starts with + or 00, or
  • it is a 10-digit number whose first digit is 2-9, or an 11-digit number starting with 1 followed by 2-9. These are read as North American numbers (the NANP covers the US and its territories, Canada and some Caribbean countries) and get +1.

Any other local number, such as the UK 020 7946 0958 or the Australian (02) 1234 5678, is given as digits only, because a local number does not say which country it belongs to. Add the country code yourself, for example with add prefix and suffix after removing the leading 0.

Be careful with 10-digit numbers from outside North America: the Indian mobile number written locally as 98765 43210 becomes +19876543210, which is wrong. Write such numbers with their +91 prefix first, or use Digits only.

Duplicates and sorting

With Remove duplicates ticked, numbers are compared in their international form, so the same number written in different ways counts once and the first spelling is kept:

555-123-4567
(555) 123 4567
+1 555 123 4567
1-555-123-4567

gives just 555-123-4567 (the status says 1 number found). +44 (0)20 7946 0958 and +44 20 7946 0958 also count as one. A local number and the same number with its country code, such as 020 7946 0958 and +44 20 7946 0958, are kept as two, because the tool does not know the local number is British.

Sort orders the numbers by their digits, ignoring +, spaces and brackets. Numbers with a country code therefore sort by the code: 020 1234 5678, +1 555 123 4567, +44 20 7946 0958, 555-987-6543. To sort the list differently, copy it into sort lines.

Known limits

The extractor is a pattern, not a phone number validator, so check the result when it matters:

  • Numbers of different shapes separated only by a space can merge. 020 7946 0958 06 12 34 56 78 gives the wrong 020 7946 0958 06 12, and +44 20 7946 0958 020 7946 0959 gives +44 20 7946 0958 020 and 7946 0959. With a comma, slash or word between them, both are found.
  • Other grouped figures can look like phone numbers. A space-separated figure such as 12 345 678 has the shape of a local number and appears in the result.
  • Numbers broken across two lines are not joined. 555-123- at the end of one line and 4567 on the next give nothing; join the lines first.

When people need it

  • Building a call or SMS list from an exported contact sheet, a web form report or a pasted email thread, in the + format an SMS service or CRM import expects.
  • Cleaning a CSV where the phone column is mixed with notes such as “mobile, call after 5”, or where several numbers sit in one cell.
  • Checking a document before publishing, to find every phone number left in a draft, a PDF copy or a page’s HTML (numbers in tel: links are found too).
  • Pulling contact details from a long email together with the email extractor; the guide to extracting from large text files covers working with big exports.

Questions

Is my text uploaded anywhere?

No. The extraction runs in your browser with JavaScript, and nothing is sent to a server. The text is kept only in this browser tab so it is still there if you open another tool, and it is gone when you close the tab.

How do I extract phone numbers from a CSV or Excel file?

Open the CSV with the Open file button, or copy the column or the whole sheet and paste it. Commas, quotes and tabs between cells end a number, so the names and cities next to the numbers are ignored.

Can I extract phone numbers from a PDF?

Open the PDF, select all the text, copy it and paste it here; Open file reads plain-text files only, not .pdf. A number broken over two lines in the PDF (555-123- at the end of one line, 4567 at the start of the next) is not found, so join those lines first with remove line breaks.

Can it extract phone numbers from an image or screenshot?

No, it reads text only. Copy the text out of the image first, for example with the text recognition built into your phone or operating system, then paste it here and check the result against the image.

Does it check whether a number is real?

No. It finds text shaped like a phone number, 7 to 15 digits in groups, and cannot tell whether the number is assigned or which country a local number belongs to. Check important numbers before you call or import them.

Why is a number missing or cut short?

Numbers with fewer than 7 or more than 15 digits are skipped, as are digit runs without + or 00 that do not have 10 or 11 digits, and numbers joined to letters (ID#5551234567). Two numbers separated only by a space are split when the first is a North American number or both have the same shape, but other pairs can run together; put a comma or word between them.

How do I get the numbers in one row, separated by commas?

Set One per to Comma or Semicolon. For other separators or quotes around each number, keep one per line and use the comma separator.