Back to the blog
sms apidevelopersnummers

How do you format phone numbers correctly?

Most delivery problems with international sending are not network problems but format problems.

The international format

Country code, then the number without the leading zero. A Belgian number written locally as 0470… becomes +32470… Dropping that zero is the step most often forgotten.

Store it correctly straight away

Save numbers in that international format, even if your users type them locally. Put the conversion at save time, not at send time — otherwise two formats sit side by side in your database.

Spaces and dashes

Those can go. They exist for readability and carry no meaning. Strip everything that is not a digit or a plus sign.

Landlines

They cannot receive SMS. Store them separately or flag them, otherwise you keep paying for messages that arrive nowhere.

Validate on entry

Check the format while somebody is typing. Afterwards the mistake cannot be corrected, because you cannot reach that person to ask.

#phone number format#e164#country code#validate number
Trust Guard Security Scanned
Call us
Send an email