1. Clean the input
Remove spaces, parentheses and hyphens while preserving the digits and country context.
+1 test data
Generate Canada phone number examples for development, QA, input masks and documentation. Results are not live subscriber lines.
| Calling code | +1 |
|---|---|
| National pattern | (NPA) NXX-XXXX |
| E.164 example | +14165550123 |
| Typical length | 10 national digits |
Remove spaces, parentheses and hyphens while preserving the digits and country context.
Keep all 10 national digits and add +1. Do not add a trunk zero.
Use +14165550123 for machine storage and format it for display at the edge of your application.
| Case | Fixture | Expected test behavior |
|---|---|---|
| National display | (NPA) NXX-XXXX | Accept punctuation, then normalize. |
| Valid E.164 structure | +14165550123 | Accept for format testing; do not infer reachability. |
| Invalid length | +1416555012 | Reject before storing or sending to an API. |
Manually reviewed country notes
Canada shares country code +1 and the ten-digit North American format with the United States and several other territories. A calling code match alone therefore cannot select Canada; the area code or an explicit CA region must remain part of the parsing context.
This page uses a 416-555-01xx fixture. The 555-0100 through 555-0199 block is reserved across the North American plan for entertainment and advertising examples, not subscriber discovery.
Preserve the 416 area code when normalizing the fixture.
Require CA context for national input instead of guessing from +1.
Keep all ten national digits after the shared +1 calling code.
These cases document the fixture contract used by GetPhoneNum. They test parsing and normalization only; they never prove that a subscriber exists.
| Input | Expected result | Reason |
|---|---|---|
(416) 555-0123 | +14165550123 | Normalize a Toronto-shaped fixture |
+1 416 555 0123 | +14165550123 | Normalize punctuation |
416555012 | Reject | One digit short |
+1 416 555 0123 without region | Shared plan | Do not infer Canada from +1 alone |
+14165550123 | Reserved fixture | Do not infer reachability |
Reviewed by GetPhoneNum Editorial Team · Last reviewed August 11, 2026
Test empty input, pasted punctuation, a missing country code, one digit too few and one digit too many. Avoid using a single global regex for every country.
Test a JavaScript regexStore a normalized E.164 value and keep display formatting separate. Try the E.164 formatter or structural validator.
Numbering plans change. Use a maintained numbering library and treat carrier, line type and reachability as separate checks.
Browse calling-code referencesRelated generators and tools
They are generated test fixtures, not verified subscriber lines. Even a structurally valid value may coincide with an assigned number unless it comes from an officially reserved fictional range.
+1 is the international country calling code for Canada. In E.164 format it appears after the leading plus sign and before the national number.
No capability is provided or verified. Do not call, text or use generated values for account verification.
Numbering rules can change. Check the Canadian Numbering Administrator before enforcing production rules.
Create up to 100 local fixtures in the browser, download the open dataset, or use the API design reference to define a deterministic contract for automated test suites.