How-To Guide 2 min read

How to Format Phone Numbers in E.164 for Conversion Tracking

E.164 is the international phone number format required by Google Ads, Meta, Microsoft Ads, and TikTok for Enhanced Conversions. Learn how to normalize phone numbers to E.164 format with The Upload Offline Conversions App.

Last verified: 2026-11-05

E.164 is the international standard phone number format required by all major ad platforms for Enhanced Conversions. If your phone numbers aren’t in E.164 format before SHA-256 hashing, the hashed values won’t match the ad platform’s records — and your phone-based matching will return zero results.

E.164 Format Rules

+[country code][national number]
RuleDescription
Start with +Always begins with the plus sign
Country code1-3 digits (1 for US/Canada, 44 for UK, etc.)
No formattingNo spaces, dashes, parentheses, or dots
Digits onlyAfter the +, only digits
Maximum length15 digits total (including country code)

Common US Number Transformations

Raw InputE.164 OutputValid?
(555) 123-4567+15551234567✅
555-123-4567+15551234567✅
555.123.4567+15551234567✅
5551234567+15551234567✅
1-555-123-4567+15551234567✅
+1 (555) 123-4567+15551234567✅
15551234567+15551234567✅

Step-by-Step Conversion

Raw:     "(555) 123-4567"
Step 1:  "5551234567"        ← Remove all non-digit characters
Step 2:  "15551234567"       ← Add country code (if 10 digits)
Step 3:  "+15551234567"      ← Add "+" prefix
Step 4:  SHA-256 hash        ← Hash for Enhanced Conversions

Code Implementation

JavaScript

function toE164(phone, countryCode = '1') {
  // Remove all non-digit characters
  let digits = phone.replace(/\D/g, '');
  
  // Handle US/Canada numbers
  if (countryCode === '1') {
    if (digits.length === 10) {
      return '+1' + digits;
    }
    if (digits.length === 11 && digits.startsWith('1')) {
      return '+' + digits;
    }
  }
  
  // For other countries, prepend country code if needed
  if (!digits.startsWith(countryCode)) {
    return '+' + countryCode + digits;
  }
  
  return '+' + digits;
}

Python

import re

def to_e164(phone, country_code='1'):
    digits = re.sub(r'\D', '', phone)
    if country_code == '1':
        if len(digits) == 10:
            return f'+1{digits}'
        if len(digits) == 11 and digits.startswith('1'):
            return f'+{digits}'
    return f'+{digits}'

Use the E.164 Formatter tool for quick, manual verification.

International Formats

CountryExample RawE.164
US/Canada(555) 123-4567+15551234567
UK020 7946 0958+442079460958
Australia(02) 1234 5678+61212345678
Germany030 123456+4930123456

The Full Pipeline: Normalize → Format → Hash

Raw phone:     "(555) 123-4567"
     ↓
E.164:         "+15551234567"
     ↓
SHA-256:       "d4f5c3b1e72a9f8d..."
     ↓
Send to platform as hashed_phone_number

All three steps are required. Skip any one and matches will fail.

Common Mistakes

MistakeHash ofPlatform’s Hash ofMatch?
No E.164SHA("5551234567")SHA("+15551234567")❌
Missing +SHA("15551234567")SHA("+15551234567")❌
Kept dashesSHA("555-123-4567")SHA("+15551234567")❌
CorrectSHA("+15551234567")SHA("+15551234567")✅

How TUOCA Handles Phone Numbers

TUOCA automates the entire pipeline:

  1. Raw input — Accepts any common phone format from your data source
  2. Country detection — Uses the account’s country setting
  3. E.164 normalization — Strips non-digits, adds country code and +
  4. SHA-256 hashing — Hashes the normalized E.164 number
  5. Platform routing — Sends the hash to the appropriate API field

You provide raw phone numbers in any format. TUOCA handles the rest.

Frequently Asked Questions

E.164 is the international phone number format defined by the ITU. It consists of a '+' sign, country code, and the national phone number with no spaces, dashes, or parentheses. Example: +15551234567 for a US number. All ad platforms require phone numbers in E.164 format before SHA-256 hashing for Enhanced Conversions.

Ad platforms hash their user records using E.164 format. If you hash your phone numbers in a different format — (555) 123-4567 instead of +15551234567 — your SHA-256 hash won't match theirs, resulting in zero phone-based matches. E.164 ensures both sides hash the same input.

Yes. TUOCA automatically normalizes all phone numbers to E.164 format before SHA-256 hashing. It handles US, Canadian, UK, and Australian formats, strips non-digit characters, and prepends the correct country code. You provide raw phone numbers, and TUOCA handles the rest.

Stop Guessing. Start Proving ROI.

TUOCA connects your CRM and call tracking data directly to your ad platforms. Set up in minutes.