Phone Normalizer API
Parse and normalize any phone number — strip formatting, detect country, extract the dial code and national number with a single GET request.
Get your API token
Create an account and subscribe ($9/month) to start using the API.
Endpoint
GET
/api/phone
Pass the phone number as the phone query parameter.
Authentication
Include your API token in every request:
- Query parameter:
?token=YOUR_TOKEN - Header:
Authorization: Bearer YOUR_TOKEN
Parameters
| Parameter | Required | Description |
|---|---|---|
phone |
Yes |
The phone number to normalize. Accepts any common format:+37061234567, 0037061234567, +1 (555) 000-1234, 061234567, etc.Max 30 characters. All punctuation (spaces, dashes, parentheses, dots) is stripped automatically. |
Response Fields
| Field | Type | Description |
|---|---|---|
data.input |
string | The cleaned input after stripping punctuation (digits and + only). |
data.normalized |
string | The national number — digits after the dial code is removed. Empty string if no prefix was detected. |
data.countrycode |
string | ISO 3166-1 alpha-2 country code (e.g. LT, DE, US). Empty string if undetected. |
data.dialcode |
string | Numeric dial code without the + sign (e.g. 370, 49, 1). Empty string if undetected. |
data.full |
string | Dial code + national number, no +, no spaces (e.g. 37061234567). Equals normalized when no prefix is detected. |
When no international prefix is found (local number only), countrycode and dialcode
are empty strings and full equals normalized.
Supported Dial Codes
Detection requires a leading + or 00 prefix.
Longest prefix match wins (e.g. +370… resolves to LT, not RU +7).
| Dial code | Country | Dial code | Country | Dial code | Country |
|---|---|---|---|---|---|
| +1 | US / Canada | +33 | FR | +358 | FI |
| +7 | RU | +34 | ES | +359 | BG |
| +31 | NL | +36 | HU | +370 | LT |
| +32 | BE | +39 | IT | +371 | LV |
| +41 | CH | +43 | AT | +372 | EE |
| +44 | GB | +45 | DK | +373 | MD |
| +46 | SE | +47 | NO | +374 | AM |
| +48 | PL | +49 | DE | +375 | BY |
| +61 | AU | +64 | NZ | +380 | UA |
| +81 | JP | +82 | KR | +381 | RS |
| +86 | CN | +91 | IN | +385 | HR |
| +351 | PT | +352 | LU | +386 | SI |
| +353 | IE | +354 | IS | +387 | BA |
| +355 | AL | +356 | MT | +389 | MK |
| +357 | CY | +420 | CZ | +421 | SK |
| +376 | AD | +377 | MC | +423 | LI |
| +382 | ME |
Example Requests
Lithuanian number with + prefix
GET /api/phone?token=YOUR_TOKEN&phone=%2B37061234567
German number with 00 prefix
GET /api/phone?token=YOUR_TOKEN&phone=004915112345678
US number with spaces and dashes
GET /api/phone?token=YOUR_TOKEN&phone=%2B1+555-000-1234
Local number (no prefix)
GET /api/phone?token=YOUR_TOKEN&phone=061234567
Example Responses
International number detected
{
"success": true,
"data": {
"input": "+37061234567",
"normalized": "61234567",
"countrycode": "LT",
"dialcode": "370",
"full": "37061234567"
}
}
Local number only (no prefix)
{
"success": true,
"data": {
"input": "061234567",
"normalized": "061234567",
"countrycode": "",
"dialcode": "",
"full": "061234567"
}
}
Error Responses
| HTTP Status | Reason |
|---|---|
401 |
Missing or invalid API token. |
403 |
No active subscription. |
422 |
Missing phone parameter or input exceeds 30 characters. |
Live Tester
Log in to use the live tester.