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 codeCountryDial codeCountryDial codeCountry
+1US / Canada+33FR+358FI
+7RU+34ES+359BG
+31NL+36HU+370LT
+32BE+39IT+371LV
+41CH+43AT+372EE
+44GB+45DK+373MD
+46SE+47NO+374AM
+48PL+49DE+375BY
+61AU+64NZ+380UA
+81JP+82KR+381RS
+86CN+91IN+385HR
+351PT+352LU+386SI
+353IE+354IS+387BA
+355AL+356MT+389MK
+357CY+420CZ+421SK
+376AD+377MC+423LI
+382ME    

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.