Zip code extractor

Zip codes found

Matches US 5-digit and ZIP+4 codes bordered by a non-digit on both sides, so a ZIP code embedded in a longer number (a phone number, an order ID) is not mistakenly picked up.


What it is for

Given a block of text - a pasted spreadsheet column, a list of addresses, a document dump - this finds every US ZIP code and ZIP+4 (12345 or 12345-6789) inside it and lists them separately from the surrounding text, so they do not have to be picked out by eye or fought over with a spreadsheet formula.

What counts as a match

Any five-digit run bordered by a non-digit (or the start/end of the text) is treated as a candidate ZIP code, with an optional -#### suffix picked up as ZIP+4. A five-digit number that is part of a longer number - a phone number, an order ID, a year embedded in a longer figure - is not matched, since it is not bordered by a non-digit on both sides the way a genuine ZIP code in running text is.

Deduplication and order

Results are deduplicated and can be sorted numerically or left in the order they appeared - useful when the source order still matters, versus when only the distinct set of codes is wanted for a lookup or an import.

Related tools

See the zip code format validator to check a single code, and the URL extractor for the equivalent job on links.

Rate this tool

Was this tool useful? Your feedback helps us improve it.

No ratings yet — be the first to rate this tool.
Your rating (required)
0 / 2000

Please do not include passwords, payment details or other sensitive information.

Your feedback is sent privately to the A2Z.Tools team and will not be posted publicly.