1. Clean the input
Remove spaces, parentheses and hyphens while preserving the digits and country context.
+55 test data
Generate Brazil phone number examples for development, QA, input masks and documentation. Results are not live subscriber lines.
| Calling code | +55 |
|---|---|
| National pattern | (AA) 9xxxx-xxxx |
| E.164 example | +5511987654321 |
| Typical length | 11 digits for mobile with area code |
Remove spaces, parentheses and hyphens while preserving the digits and country context.
Keep the two-digit area code and subscriber number after +55; omit carrier-selection codes.
Use +5511987654321 for machine storage and format it for display at the edge of your application.
| Case | Fixture | Expected test behavior |
|---|---|---|
| National display | (AA) 9xxxx-xxxx | Accept punctuation, then normalize. |
| Valid E.164 structure | +5511987654321 | Accept for format testing; do not infer reachability. |
| Invalid length | +55119876543 | Reject before storing or sending to an API. |
Manually reviewed country notes
A Brazilian mobile fixture combines a two-digit area code with a nine-digit subscriber number whose mobile portion begins with 9. Carrier-selection digits used in some domestic dialing flows are instructions, not part of the E.164 value.
Anatel publishes numbering structure, not a universal fictional mobile range for testing. Generated values are suitable only for isolated QA systems with calls and messaging disabled.
Preserve the two-digit area code.
Keep the leading 9 in the mobile subscriber portion.
Do not store carrier-selection codes in the canonical value.
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 |
|---|---|---|
(11) 98765-4321 | +5511987654321 | Normalize area code and mobile digits |
+55 11 98765 4321 | +5511987654321 | Normalize an international input |
11 8765-4321 | Reject or classify separately | Eight-digit subscriber shape is not this mobile fixture |
021 11 98765-4321 | +5511987654321 | Remove domestic carrier-selection instructions |
+55119876543 | Reject | One digit short |
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.
+55 is the international country calling code for Brazil. 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 Anatel mobile numbering table 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.
Advertisement