Most "invalid phone number" errors at sign-up, and many verification codes that never get sent, come down to E.164 format errors: a missing plus sign, a missing or wrong country code, or a domestic 0 left in after the country code. The fix is to write the number as +, country code, then the national number with no spaces or punctuation; our free phone number formatter converts any input into that form. Below are the mistakes that break verification, the exceptions the usual "just drop the zero" advice gets wrong, and how to tell a format problem from a delivery problem.
What E.164 format is, in one paragraph
E.164 is the ITU-T standard for international phone numbers: a plus sign, a country code of one to three digits, then the national number, with a maximum of 15 digits after the plus. The in-force version listed by the ITU's E.164 recommendation page is E.164 (02/26), "The international public telecommunication numbering plan". No country code starts with 0, so the first digit after the plus is always 1 to 9.
A US number written domestically as (202) 555-0143 becomes +12025550143. A UK mobile written as 07700 900123 becomes +447700900123: the country code 44 replaces the leading 0. SMS gateways and verification services expect this single, unambiguous string, because it routes the same way no matter where the message is sent from.
The 9 E.164 format errors that break verification
Nearly every rejected number falls into one of nine patterns. The first five are what people type into sign-up forms; the last four are mistakes in the code that stores and sends the number.
| # | What was entered or stored | What usually happens | Fix |
|---|---|---|---|
| 1 | National format with no country code: 07700 900123 | Rejected, or sent to the wrong country if the system guesses a default | Add the country code: +447700900123 |
| 2 | Country code plus the domestic 0: +4407700900123 | Rejected as invalid or too long | Drop the trunk 0 after the code (but see the Italy exception below) |
| 3 | Country code typed twice: country picker set to +44 and number typed as +44 7700 900123 | Number becomes +44447700900123 and fails | When a form has a country selector, type only the national number |
| 4 | Wrong country code, e.g. +1 for an Indian number | Rejected as invalid, or the code is sent to a stranger | Check the code for the country the SIM belongs to, not where you are now |
| 5 | International dialling prefix instead of plus: 0044… or 011 44… | Some forms accept 00, others reject it, and few expect 011 (the North American prefix) | Use +; dialling prefixes differ by country, the plus does not |
| 6 | Number stored as an integer column | The plus and any leading zero are silently lost | Store phone numbers as text, never as a numeric type |
| 7 | Separators or extensions kept: +1 (202) 555-0143 ext 12 | Strict APIs reject it; lenient ones may absorb the extension digits into the number | Strip everything except the plus and digits; store extensions in a separate field |
| 8 | Plus sign missing on an otherwise correct number: 447700900123 | Strict APIs reject it as not E.164 | Prefix the plus before sending |
| 9 | Validated with a regex only | Well-shaped but impossible numbers pass, and the SMS step fails later | Validate against numbering-plan data with a maintained library |
Twilio's documentation for its error 21211, "Invalid 'To' phone number" (last modified 22 June 2026), lists the same causes from the sender's side: missing plus, missing country code, punctuation, typos and the wrong country code. If a number is rejected the instant you submit it, one of these nine is almost always the reason.
Exceptions where "drop the leading zero" is wrong
The common rule, "add the country code and drop the first 0", is right for most countries but not all. Several glossary pages state it as universal; the maintainers of Google's libphonenumber library document the cases where it fails in their list of falsehoods programmers believe about phone numbers.
- Italy keeps its 0. Since 1998, Italian numbers that begin with 0, such as Rome's 06 fixed lines, keep that 0 after +39, so a Rome number written 06 xxxx xxxx becomes +39 06 xxxx xxxx. Stripping the 0 produces a different, usually invalid, number.
- Argentina's mobiles change shape. Domestically an Argentine mobile is dialled with a 15 prefix; in international format the 15 goes and a 9 is inserted after +54. Converting by swapping prefixes alone gets it wrong.
- One code, several countries. +1 covers the US, Canada and a number of Caribbean countries, and +7 covers Russia and Kazakhstan. A correct E.164 number from these codes does not tell you which country the user is in, so don't infer country, language or time zone from the code.
- The plus is not "00". The plus is notation for "your international prefix here". That prefix is 00 in much of the world, 011 in North America and 010 in Japan, which is why the plus is the only form that works everywhere.
The practical takeaway: hand-written rules drift from reality. A library that ships numbering-plan metadata, such as libphonenumber or one of its ports, handles these cases and is updated when plans change.
How to fix E.164 format errors as a user
If a sign-up form says your number is invalid, re-enter it in full international form, then work through the form's own quirks. These steps resolve most rejections:
- Find the right country code for the country your SIM or number belongs to; the country calling code list has every code.
- Check the form for a country selector. If it has one, pick the country and type only the national number, without the leading 0 (except Italian landlines).
- If there is no selector, type the whole number starting with the plus:
+447700900123. - Remove spaces, brackets and dashes if the form still complains; some forms only accept digits, and a few reject the plus sign itself.
- Check the digit count against what you know the national number should be. One missing or extra digit is enough to fail.
Some apps are stricter than the standard. WhatsApp, for example, needs the full international number with the correct country code, a point covered in our WhatsApp OTP troubleshooting guide.
How to prevent E.164 errors in your own sign-up flow
Normalise every number to E.164 once, at input, and store only that string. Everything downstream (the SMS gateway, the database, deduplication, support lookups) then sees one consistent form.
- Use a country picker with a sensible default, and parse the input against the chosen country, so users never have to know the rules above.
- Parse and validate with numbering-plan data, not a regex. A pattern like
^\+[1-9]\d{1,14}$only checks shape; it accepts numbers that cannot exist. A widely copied variant even makes the plus optional, so national numbers slip through. - Store a text column holding the E.164 string, and keep the raw input separately for debugging.
- Re-check validity over time. Numbering plans change and numbers are reassigned, so a number valid at sign-up is not guaranteed to stay valid.
- Watch numbers coming from other systems. APIs don't all return the plus: the example webhook payload in our own API documentation shows the number as digits only (checked 30 October 2026), so add the plus back before passing it to a system that requires strict E.164.
To check a batch of existing records, paste them into the phone number validator, which accepts one number per line and runs in your browser. For the wider testing picture, from mocks to real delivery, see our developer guide to testing SMS OTP without a real phone.
Format error or delivery problem? How to tell
A format error shows up immediately: the form or API refuses the number before any SMS is sent. If the number is accepted and the code still never arrives, the format is probably fine and the cause lies elsewhere.
| Symptom | Likely cause | Where to look |
|---|---|---|
| "Invalid number" the moment you submit | One of the nine format errors above | Re-enter in E.164; check country code and digit count |
| Number accepted, "this number can't be used" | The app blocks that number type (often VoIP or shared numbers) | Use a real mobile number the app accepts |
| Format accepted, then "invalid number" from the verification step | Well-formed but not a live number: a typo, or a line that was deactivated or is waiting to be reassigned | Show the full number back to the user to confirm it; offer another channel such as email |
| Number accepted, no SMS ever arrives | Sender route, carrier filtering or rate limits on repeated requests | Wait before resending; try again later or with another number |
| SMS arrives at someone else's phone | Valid but wrong number (wrong country code or a typo) | Correct the number; never reuse a code you received by mistake |
The third row is easy to miss: a number can pass every format check and still be refused. Twilio's Verify service, for example, returns a separate error (60006) when a correctly formatted E.164 number is judged invalid further down the line, and lists typos and deactivated or recycled numbers as the usual causes. The second row is the one most often confused with a format problem. Many apps reject internet-based numbers even when they are perfectly formatted; our explainer on what apps check when they see a VoIP number covers how that works. For teams running real end-to-end sign-up checks, the failure table in our guide to testing sign-up flows with captcha and SMS OTP picks up where this one stops.
How NumberOTP fits in
If you need a second number to receive a code for your own account, or to test your own app's SMS step, NumberOTP rents real non-VoIP numbers in 190+ countries from three independent number pools. You pay per activation with no monthly fee, new accounts get $0.10 of free credit, and if no SMS arrives the charge is refunded automatically (all as listed on the pricing page on 30 October 2026). Use it for your own accounts and follow each platform's terms; some platforms don't allow virtual numbers, so a number usually works but is never guaranteed for every service.
Frequently Asked Questions
What is an example of a phone number in E.164 format?
A US number written domestically as (202) 555-0143 is +12025550143 in E.164. It starts with a plus, then the country code 1, then the ten-digit national number, with no spaces, brackets or dashes. A UK mobile written 07700 900123 becomes +447700900123, because the country code 44 replaces the domestic leading zero.
Should I keep the 0 after the country code?
In most countries, no: the leading 0 is a domestic trunk prefix and is removed when you add the country code, so 020 in London becomes +44 20. Italy is the main exception. Italian numbers that begin with 0 have kept it in international format since 1998, so a Rome number is written +39 06 followed by the rest of the digits.
Is the plus sign required in E.164?
The plus is part of E.164 notation and strict SMS APIs require it. It stands for whatever international prefix the caller's country uses, which is why it works everywhere. Some forms accept 00 instead or add the plus for you, but if a form or API rejects a number that is otherwise correct, adding the plus is the first thing to try.
How many digits can an E.164 number have?
Up to 15 digits, not counting the plus sign. That total includes the country code, which is one to three digits long. Many real numbers are much shorter, so 15 is a maximum, not a target length. Each country sets its own lengths, which is why checking against numbering-plan data catches errors a simple length check misses.
Why does a site say my number is invalid when it works for calls?
Usually the form wants a different layout from the one you typed: the country code twice, a leading 0 left in, or punctuation it can't handle. Re-enter it with the country selector set and only the national number, or in full plus format if there is no selector. If the number is accepted but then refused, the app may not accept that type of number.
Get the format right, then get the code
Once the number is in clean E.164 form, most "invalid number" errors go away. If you need a real mobile number to receive a verification code for your own account or to test your own sign-up flow, create a free NumberOTP account and use the $0.10 sign-up credit to pick a country and service, with an automatic refund if no SMS arrives.
Frequently Asked Questions
What is an example of a phone number in E.164 format?+
A US number written domestically as (202) 555-0143 is +12025550143 in E.164. It starts with a plus, then the country code 1, then the ten-digit national number, with no spaces, brackets or dashes. A UK mobile written 07700 900123 becomes +447700900123, because the country code 44 replaces the domestic leading zero.
Should I keep the 0 after the country code?+
In most countries, no: the leading 0 is a domestic trunk prefix and is removed when you add the country code, so 020 in London becomes +44 20. Italy is the main exception. Italian numbers that begin with 0 have kept it in international format since 1998, so a Rome number is written +39 06 followed by the rest of the digits.
Is the plus sign required in E.164?+
The plus is part of E.164 notation and strict SMS APIs require it. It stands for whatever international prefix the caller's country uses, which is why it works everywhere. Some forms accept 00 instead or add the plus for you, but if a form or API rejects a number that is otherwise correct, adding the plus is the first thing to try.
How many digits can an E.164 number have?+
Up to 15 digits, not counting the plus sign. That total includes the country code, which is one to three digits long. Many real numbers are much shorter, so 15 is a maximum, not a target length. Each country sets its own lengths, which is why checking against numbering-plan data catches errors a simple length check misses.
Why does a site say my number is invalid when it works for calls?+
Usually the form wants a different layout from the one you typed: the country code twice, a leading 0 left in, or punctuation it can't handle. Re-enter it with the country selector set and only the national number, or in full plus format if there is no selector. If the number is accepted but then refused, the app may not accept that type of number.
Need a number right now? Get $0.10 in free credits — no card required.
Sign up free →Written by
Nanami
Nanami is a telecom and digital privacy specialist at NumberOTP with over 8 years of experience in SMS verification systems, virtual phone infrastructure, and online identity protection. He covers OTP security, number masking, developer APIs, and privacy-first verification workflows for businesses and developers worldwide.
Get your first OTP number free
$0.10 in credits on signup. No card required. Works for 1,500+ platforms.