US ZIP Code Regex

Example:
^\d{5}(-\d{4})?$ Matches: ✓ 90210 ✓ 12345-6789
Validate US ZIP codes (5 or 9 digit): ^\d{5}(-\d{4})?$
Try Regex Lab →

FAQs

What is the -6789 part?

ZIP+4 format for more precise delivery location.