Developer tools
E.164 Phone Number Formatter and URL Encoder
Paste any phone number below to get the E.164 formatted version and the URL-encoded string you need for API query parameters. Runs entirely in your browser. No data leaves the page, no sign-up required.
What is E.164?
E.164 is the ITU-T international numbering plan. It defines the format that every public telephone number worldwide must follow: a + prefix, a country calling code (one to three digits), and a subscriber number, with a maximum length of 15 digits and no spaces, dashes or brackets.
Most telecom APIs, including the Telebase carrier lookup API, require E.164 as the input format. If the number is not E.164 when it reaches the API, the lookup will fail or return incorrect results.
Why URL encoding matters for API calls
The + character at the start of an E.164 number is a reserved character in URLs. In a query string, a raw + is interpreted as a space. To pass a phone number as a query parameter, you need to encode the + as %2B.
For example, +447700900000 becomes %2B447700900000 in a URL. The formatter above gives you both versions so you can copy the right one for your context.
How the formatter works
Choose the country calling code from the dropdown. The four markets Telebase covers for KYC phone validation (GB, DE, NL, FR) are listed first.
Paste or type the subscriber number. The tool strips spaces, dashes, brackets and leading zeroes automatically. If the number already has a + and country code, the tool detects that and skips the prefix.
The E.164 string and the URL-encoded version appear instantly. Use the copy buttons, or grab the example curl command to test against any phone lookup API.
Common formatting mistakes
- Leading zero not removed. UK numbers are often written as 07700 900000. The leading zero is a trunk prefix, not part of the international number. E.164 for this number is
+447700900000, not+4407700900000. - Raw
+in a query string. Passing?phone=+447700900000sends a space instead of a plus. Use?phone=%2B447700900000. - Spaces and punctuation left in. E.164 contains only digits and the leading
+. Any spaces, dashes, dots or brackets must be stripped before the API call. - Country code applied twice. If someone pastes
+447700900000while GB is selected, a naive formatter would produce+44447700900000. This tool checks for an existing prefix first.
E.164 formatting rules by market
Each of the four markets Telebase covers has its own trunk prefix convention. The table below shows the local format, what to strip, and the resulting E.164 number.
Quick reference
- United Kingdom (+44): local numbers start with 0 (e.g. 07700 900000). Strip the leading 0. E.164:
+447700900000. - Germany (+49): local numbers start with 0 (e.g. 0151 12345678). Strip the leading 0. E.164:
+4915112345678. - Netherlands (+31): local numbers start with 0 (e.g. 06 12345678). Strip the leading 0. E.164:
+31612345678. - France (+33): local numbers start with 0 (e.g. 06 12 34 56 78). Strip the leading 0. E.164:
+33612345678.
Using the formatted number with an API
Once you have the URL-encoded number, you can pass it directly to any phone lookup endpoint. The Telebase quickstart walks through a complete first lookup. The API returns carrier, country, number type and active status in a single call with the SIM swap check, at $0.20 per check.
# Format the number to E.164, URL-encode the + curl -s 'https://api.telebase.io/lookup?phone=%2B447700900000' \ -H 'Authorization: Bearer tb_live_xxxxxxxxxxxxxxxxxxxxxxxx' # Response { "phoneNumber": "+447700900000", "active": true, "carrier": "EE", "country": "GB", "numberType": "mobile", "simSwap": "UNKNOWN", "simSwapAt": null, "_meta": { "activeSource": "LINE_STATUS" } }
simSwap returns UNKNOWN for GB, DE, NL and FR numbers while carrier registration completes. SIM swap detection is launching soon: join early access.
Request early access