The API tells you the stakes
Google's own developer documentation says it plainly: "If the contact information is not correctly formatted before hashing, the API still accepts the hashed information, but it can't be matched with a customer." No error, no warning – just a list that silently matches nobody. So the workflow below is mostly formatting, and the hash is one step near the end.
Step 1 – one identifier per column, plain text first
Lay the sheet out with each identifier in its own column – email, phone, name fields, country and postal code as applicable – and set phone and postal columns to plain text before pasting (Format → Number → Plain text), or leading zeros and long numbers are silently destroyed on arrival.
Step 2 – normalise to Google's documented rules
For hashed fields, Google's file-format documentation is specific:
- Lowercase everything, strip surrounding whitespace.
- Email, Gmail-only rule: for
gmail.comandgooglemail.comaddresses, remove periods in the username and anything from a+onwards –Jane.Doe+Shopping@googlemail.combecomesjanedoe@googlemail.com. Documented for those two domains only; do not apply it to other domains. - Phone: E.164 – "Include the country code and '+' sign." The full formatting pass is our E.164 guide; the short version is digits only, country code, leading
+.
Step 3 – hash, or let Google hash
Two documented paths:
- Upload plaintext and Google hashes the data on its side before matching.
- Hash yourself – SHA-256, hex output (Google's wording: "Use hex SHA256") – so raw customer data never leaves your sheet in readable form. This is the route compliance-minded teams take, and the reason this workflow exists in Sheets at all: Sheets has no built-in hash function, so the hashing step needs Apps Script or an add-on.
Step 4 – verify before uploading
Two ten-second checks that catch most silent failures:
- Length check: a SHA-256 hex digest is exactly 64 characters –
=LEN(B2)=64flags truncation and double-hashing at once. - Spot check: hash one value whose input you normalised by hand and confirm the digest changes when the input casing changes. If
John@andjohn@give the same digest, something upstream is pre-processing your data.
Step 5 – upload and set expectations
Upload the file to your customer list in Google Ads. Processing is not instant, and the matched size will be smaller than your row count – matching happens against signed-in Google accounts, and no formatting discipline changes that. What formatting discipline changes is whether a matchable row actually matches. If the rate looks wrong, our match-rate troubleshooting guide walks the causes in diagnostic order.
Where Hash Data fits
Hash Data puts the hashing step inside the sheet: several algorithms as formulas, and =HASHPHONE() normalising a number to E.164 and hashing it in one step – the two most error-prone steps above, collapsed into one.
→ Hash Data on the Google Workspace Marketplace
Sources
- Google Ads Help – Format your customer data file – read 2026-08-20
- Google Ads API – Get started with Customer Match – read 2026-08-20
- Google Sheets function list – read 2026-08-20