"Just say no," Stephens advised.
Two states have now declared that the practice violates their privacy laws. Last week, the Supreme Judicial Court of Massachusetts ruled that a ZIP code amounts to "personal identification information." The California Supreme Court made a similar ruling in 2011.
Here's why privacy advocates are concerned.
Some stores gather ZIP codes for benign reasons, like trying to figure out where to open a new location based on where their customers live, but the overall trend is for companies to use the data to find out more about you and market directly to you, Stephens said.
When you swipe a credit card at the cash register, the merchant receives your name, card number and expiration date, but little else, Stephens said. Give the store your ZIP code, however, and you're providing a valuable piece of the puzzle.
When paired with your name, it can help the merchant figure out your mailing address, phone number and specific demographic information, Stephens noted.
Now, the store can send you a catalog or even sell your profile to a data broker. It happens all the time, but most people have no idea of the implications of revealing their ZIP, he said.
"Obviously, if I go into a store and I make a purchase, I don't expect—unless I sign up for a mailing list—that I'm going to start receiving catalogs from the store," Stephens said.
The Massachusetts ruling last week followed a complaint brought against Michaels Stores by a customer who said she received marketing materials from the craft store chain after employees asked her to provide her ZIP code during purchases.
The California decision involved a Williams-Sonoma customer who alleged the company used her ZIP code to locate her home address.
Merchant trade associations counter that collecting such data is beneficial to consumers.
"Asking for generic information helps retailers tailor merchandise, customize advertising and marketing—promotions, deals and coupons— and individualizes services," said Stephen Schatz, a spokesman for the National Retail Federation, in a statement.
"Thus, retailers may ask for general info such as ZIP codes in order to better know and serve their customers."
In a brief filed in the Massachusetts case, the Retail Litigation Center also argued that stores collect ZIP codes for important business purposes, like analyzing demographics.
Still, Stephens said there should be no need to provide a ZIP code when asked by a clerk in a brick-and-mortar store.
But be aware that a credit card issuer sometimes asks for that information. American Express, for example, may prompt you to key in your ZIP code at some stores for security purposes. The information is not kept by the merchant and not used for marketing, the company says.
And you do still need to provide your ZIP when shopping online, whether to indicate where to ship your stuff or as part of the Address Verification System (AVS) online merchants use to fight fraud. Many gas stations use a similar method during pay-at-the-pump purchases.
In all other cases, proceed with caution.