Phone number validator

Paste a number in whatever shape you have it. This says whether it is valid E.164, and if not, exactly what is wrong with it.

Valid E.164
+251911234567

Country code +251 is Ethiopia, billed in ETB. Alphanumeric sender IDs are allowed there, after registration. What sending to Ethiopia involves.

This checks the shape of the number, in your browser. Whether it is live, which carrier holds it and whether the handset is reachable is a network question: that is what a lookup answers.

What makes a number valid

A country code, always

Without one, no system on earth can route the number, because the same digits are a different subscriber in every country. This is the rule that rejects most of the numbers people paste.

Eight to fifteen digits

E.164 caps a number at fifteen digits including the country code. Anything shorter than eight is a short code or a typo, and neither is an international destination.

No leading zero

A leading zero is a national prefix. Drop it and add the country code. Woyra does accept a leading 00, which is the international prefix much of the world dials, and treats it as the plus it stands for.

Formatting is fine

Spaces, hyphens, brackets, dots and slashes are stripped. Anything else is refused rather than silently removed, because a letter in a phone number means the data is wrong somewhere upstream.

Format is not existence

A number can be perfectly formed and belong to nobody. Checking that costs $0.004 and takes one call, and it is the cheapest fraud control there is: run it on sign-up, before you spend a verification on a number that was never real.

curl "https://api.woyra.io/v1/lookups/+254712345678?type=carrier" \
  -H "Authorization: Bearer $WOYRA_KEY"

# {"valid": true, "country": "KE", "carrier": {"name": "Safaricom", "type": "mobile"}, "reachable": true}
About lookups Get a test key

Questions

What is E.164?

The international standard for phone numbers: a plus, a country code, and the subscriber number, with no spaces or punctuation, at most fifteen digits in total. It is the only format that identifies a number unambiguously anywhere in the world.

Why is my number rejected for starting with a zero?

A leading zero is a national trunk prefix, meaningful only inside one country. 0911234567 is an Ethiopian number to an Ethiopian, and something else entirely to a network in Kenya. Drop the zero and add the country code: +251911234567.

Can I send spaces, brackets or a leading 00?

Yes. Woyra strips formatting people and spreadsheets insert, and treats 00 as the plus it stands for. What it will not do is guess a missing country code.

Does a valid format mean the number exists?

No, and that is the important distinction. Format is arithmetic; existence is a network question. A lookup asks the network whether the number is real, which carrier holds it today, and whether the handset is reachable right now.

How do I validate numbers in bulk?

Format-check them yourself with these rules, then look up the ones that pass. A lookup costs $0.004, which is cheap enough to run on every sign-up and far cheaper than sending codes to numbers that were never real.

Phone number validator: check E.164 format and country · Woyra