Extract phone numbers from text

Extract phone numbers scans pasted text for phone-shaped digit groups and lists each match on its own line. The pattern allows an optional +country, parenthesised area codes, and groups separated by spaces, dots or dashes. It is loose by design so that real-world formats from invoices, signatures and contact pages all match. The transform runs in your browser.

Input
Line 1:1 LF cloud_done Saved locally
Result Extract Phone Numbers
0 lines 0 chars

How phone matching works here

The pattern accepts an optional country code (+1, +44, up to three digits), then an area code (either bare digits or in parentheses), then two more digit groups separated by spaces, dots or hyphens. So +1 (415) 555-0123, 415.555.0199, 415 555 0144 and 020 7946 0958 all match cleanly.

The matcher is intentionally permissive. It does not validate that a number is dialable, that the country code is real, or that the area code matches the country. For format-specific matching (E.164 only, or strict North American Numbering Plan), use extract regex matches with a custom pattern.

Output is one match per line in the order found. Adjacent runs of digits in the source can sometimes be combined into a single match if the matcher reads them as parts of one number. If that happens with your data, switch to extract regex matches for a tighter pattern.

How to use extract phone numbers from text

  1. 1Paste text containing phone numbers into the input panel.
  2. 2The output panel shows every phone-shaped number, one per line.
  3. 3Click Copy to copy the list.
  4. 4Click Download to save it as a plain-text file.
  5. 5Need a stricter format? Use extract regex matches with a pattern like \+\d{1,3}\s?\d{2,4}\s?\d{3,4}\s?\d{3,4}.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What counts as a phone number here

Optional country code

A leading + followed by 1 to 3 digits is captured as the country code. +1, +44, +852 all match. Without the plus, the leading digits are still captured if they fit the area-code slot.

Parenthesised or bare area codes

The first group can be (415) or just 415. Up to four digits inside or outside the brackets are accepted, covering most national plans.

Space, dot or dash separators

Groups can be joined by a single space, dot or hyphen. 415-555-0123, 415.555.0123 and 415 555 0123 all match. Multiple separators in a row break the match.

Three groups total

After the optional country code, the matcher expects an area code (1 to 4 digits), a middle group (1 to 4 digits), and a final group (1 to 9 digits). Numbers with more or fewer groups may not match in full.

Permissive, not validated

The pattern does not check whether a number is actually dialable. Long digit strings (timestamps, IDs, order numbers) can match if they happen to look phone-shaped. Filter the output by hand or use extract regex matches for stricter rules.

Worked example

The matcher accepts the country code with or without the plus, parentheses on the area code are optional, and any of space, dot or dash works as a separator.

Input
Sales: +1 (415) 555-0123
UK: +44 20 7946 0958
Direct: 415.555.0199
Local: 020 7946 0958
Output
+1 (415) 555-0123
+44 20 7946 0958
415.555.0199
020 7946 0958

Settings reference

Behaviour Effect on output
Country code Optional. + followed by 1 to 3 digits.
Area code Bare or in parentheses. 1 to 4 digits.
Separators Single space, dot, or hyphen between groups.
Middle group 1 to 4 digits.
Final group 1 to 9 digits.
Validation None. Long digit-only IDs may match. Filter manually if needed.

FAQ

Will short codes (5-digit numbers) match?
Sometimes. The matcher needs at least three digit groups, so a bare 5-digit short code on its own may not match. If you have short codes mixed with full numbers, run extract regex matches with the pattern \b\d{5,6}\b for short codes and combine the results.
Why does my long order number match as a phone number?
The pattern is permissive. A 10 to 15 digit run with no separators can still satisfy the area-middle-final structure. If false positives are a problem, switch to extract regex matches with a stricter pattern that requires separators or a leading +.
Is the output normalised to E.164 format?
No. Each match comes through in its original formatting (parentheses, dashes, dots, spaces preserved). To normalise, run regex replace on the output: replace [^\d+] with empty string to keep only digits and the plus sign.
Are duplicates removed?
No. Every match appears in source order, including duplicates. Pipe the result through remove duplicate lines for a unique list.
Is anything sent to a server?
No. The match runs entirely in your browser. Nothing is uploaded.