Salesforce Phone Number Format: Store, Validate and Clean Numbers
Store Salesforce phone numbers in E.164, like +14155552671, and enforce it with a validation rule. Salesforce's Phone field accepts almost any text, so numbers drift into a dozen formats as reps, forms, imports and integrations add records. A one-time cleanup plus a rule stops it happening again.
How Salesforce handles phone numbers
The Phone field type is close to free text. It holds up to 40 characters and doesn't check that the content is a real number. A few behaviours to know:
| Behaviour | Effect |
|---|---|
| UI auto-formatting | For users with a US or Canadian locale, a 10-digit number typed in the interface is shown as (415) 555-2671. Numbers with a + or other lengths are left as typed. |
| API and Data Loader | Values are stored exactly as sent, with no formatting. |
| Standard fields | Leads and contacts have Phone and Mobile (MobilePhone), plus fields like Home Phone and Other Phone on contacts. |
So a US rep's 4155552671 turns into (415) 555-2671, while the same number synced from a marketing tool may sit there as +1 415-555-2671. Both are fine for a person; for deduplication, reporting and dialing they're two different strings.
Why E.164
E.164 is the international standard format: +, country code, national number, no punctuation. We cover it in E.164 phone number format. For Salesforce it has three advantages:
- Unambiguous.
+447400123456can only be a UK mobile.07400 123456depends on who's reading it. - Dialable. CTI and SMS integrations can call it without guessing the country.
- Matchable. Once every number is in one format, duplicate rules and reports work on phone numbers.
If your users prefer to see (415) 555-2671, you can still store E.164 and display a formatted version in a formula field.
A validation rule for E.164
This rule rejects any non-blank Phone that isn't a + followed by 8 to 15 digits starting with a non-zero country code:
AND(
NOT(ISBLANK(Phone)),
NOT(REGEX(Phone, "\\+[1-9][0-9]{7,14}"))
)
Set the error message to something actionable, like "Enter the number with + and country code, e.g. +14155552671". Repeat it for MobilePhone.
Two limits to be clear about:
- A regex checks shape, not validity.
+14155550000passes, though it's not a usable number. Real validation needs numbering-plan data; see phone number validation regex for what patterns can and can't do. - A new rule blocks edits to old records that don't match. Clean the existing data first, or users will hit the error on unrelated edits.
Cleaning the numbers you already have
- Export the records with Id, Phone, MobilePhone and the country field (MailingCountry, Country or BillingCountry) using Data Loader or a report.
- Normalise every number to E.164, using the record's country for numbers without a
+. - Flag invalid numbers rather than guessing. Put them in a review list.
- Check mobiles. Numbers in MobilePhone that are really landlines will fail SMS sends. Outside North America the prefix shows it; in the US and Canada you need a carrier lookup. See mobile vs landline lookup.
- Update the records with Data Loader using the Id column. Run 50 first and check them.
- Turn on the validation rule once the data is clean.
Doing steps 2–4 in one upload
Export the records to CSV and upload the file on SimpleVerifier's verifier. It finds the phone column and adds:
phone_status: valid, invalid or emptyphone_e164: the cleaned number, ready to load backphone_countryandphone_type(mobile, landline, toll-free, VoIP or "mobile_or_landline")
That's included on paid plans. Live carrier lookups, a paid extra (see pricing), return the real line type (mobile, landline or VoIP) and the carrier, including for US and Canadian numbers where the numbering plan can't tell.
The other columns in your export, including Id, come back untouched, so the file goes straight into Data Loader. Emails in the same file get a live mailbox check; see verifying emails in Salesforce for that side.
Try one number first with the free phone number validator.
Related: HubSpot phone number format · clean CRM phone numbers · remove duplicate phone numbers · international phone number format
Common questions
What is the best phone number format for Salesforce?
E.164: a plus sign, the country code and the number with no spaces, such as +14155552671. It works for every country and is what most dialers, SMS tools and telephony integrations expect.
Does Salesforce format phone numbers automatically?
Partly. When a user with a US or Canadian locale types a 10-digit number in the Salesforce interface, it is displayed as (415) 555-2671. Numbers loaded through the API, Data Loader or integrations are stored as sent, which is why formats drift.
How do I validate phone numbers in Salesforce?
Add a validation rule on the Phone field with a REGEX check, for example requiring a plus sign followed by 8 to 15 digits. That enforces the format going forward. It cannot tell whether the number is allocated or which carrier serves it.
How long can a Salesforce phone field be?
The Phone field type holds up to 40 characters. That is enough for any E.164 number, which is at most 16 characters including the plus sign.
Check your list before you send
Real mailbox checks over SMTP, and nothing is sent to the address. Sign in with Google and your first 100 email checks are free, no card. Plans for bigger lists are on the pricing page.