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.

E.164 Type a number above
URL-encoded For API query strings

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

Step one: select the country

Choose the country calling code from the dropdown. The four markets Telebase covers for KYC phone validation (GB, DE, NL, FR) are listed first.

Step two: enter the number

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.

Step three: copy the output

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

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

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.

Example: Telebase lookup with a formatted number
# 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.

SIM swap detection: launching soon

The Telebase API already returns carrier, country, number type and active status. SIM swap detection for the UK, Germany, the Netherlands and France is completing carrier registration now. Request early access to be notified when it goes live.

Request early access