Online Playground
Browse tools

Phone Number Extractor

Pull every phone number out of any text and get a clean E.164 list.

Extract phone numbers from text

Try

Processed locally with libphonenumber-js. Nothing you enter is sent to a server.

How it works

Three steps, all in your browser

  1. 1

    Paste your text

    An email thread, a scraped page, a PDF you copied from. Up to about 500,000 characters.

  2. 2

    Set a default country

    Local numbers without + are only found when a country is set. Numbers with + are always found.

  3. 3

    Copy the list

    Get every number once, as E.164, or download it as CSV with its source text.

In depth

A worked example

This is the text below, run through the extractor with the UK as the default country. It found the phone numbers and ignored the date and the invoice number, which look like digits but are not phone numbers.

Call +44 20 7946 0958 or 020 7946 0321 (office). Order ref 2024-11-03, invoice 1234567. Fax: +1 650 253 0000 x12.

Found in textE.164Country
+44 20 7946 0958+442079460958United Kingdom
020 7946 0321+442079460321United Kingdom
+1 650 253 0000 x12+16502530000United States

What it finds and what it skips

The extractor uses the text search built into libphonenumber-js, which Google's own JavaScript port does not have. It is designed for phone numbers people write, so it deliberately skips emergency numbers like 911, SMS short codes like 12345, numbers starting with *, alphabetic numbers like 1-800-GOT-MILK, and two numbers squeezed into one with combined extensions.

Getting the most out of it

  • Set the default country when your text contains local numbers. Numbers with a plus sign are always found.
  • Leave "Remove duplicates" on to get one row per number even if it appears ten times.
  • Check the Status column: Valid numbers fit an assigned range, while Possible numbers only fit the length and may contain a typo.
  • Download the CSV to keep the text each number came from.

Extracting from different sources

  • Emails and web pages: copy the visible text, not the HTML source, so the numbers are not split by tags.
  • PDFs: select and copy the text. A scanned PDF is an image, so it needs text recognition first.
  • Spreadsheets: paste one column at a time. Numbers stored as plain numbers may have lost their leading plus sign, so set the default country.
  • Chat exports and logs: paste them as they are. Date stamps and message IDs are ignored.
  • Numbers broken over two lines can be missed, so join the lines first if a number is cut by a line break.

What to do with the list afterwards

The extractor gives you numbers in E.164, which is the right format to store. Run them through the bulk phone validator if you want to separate valid numbers from possible ones, or the type checker if you only want mobile numbers for SMS. Always keep the source text from the CSV, so you can see where a questionable number came from.

Limits

The tool reads up to about 500,000 characters at a time and runs in your browser, so the text never leaves your device. It finds numbers, not names, so it cannot tell you whose number it is.

FAQ

Questions people ask

How does the extractor find numbers?

It scans the text with the matcher from libphonenumber-js, which looks for sequences that parse as phone numbers and rejects dates, prices and IDs that merely look like them.

Why was a number missed?

Numbers without a + sign need a default country. Very short numbers, and strings broken across lines or inside long words, can also be skipped on purpose to avoid false matches.

Is my text sent to a server?

No. The extraction runs in your browser and the text never leaves your device.