Random ZIP Code Generator

Generate random US ZIP codes and ZIP+4 codes by state, with real 3-digit prefixes for each state. Philippine ZIP codes too. Test data for forms and address fields.

// About

Generate Random US ZIP Codes by State

US ZIP and ZIP+4 codes with real 3-digit state prefixes, plus Philippine ZIP codes.

What is it?

This tool makes random US ZIP codes that start with a 3-digit prefix the USPS assigns to the state you pick. A New York result starts with a New York prefix, a Texas result with a Texas prefix, and so on for all 50 states and the District of Columbia. You can get the 5-digit form or ZIP+4. The Philippines also uses 4-digit ZIP codes, and you can still pick it in the country list.

How it works?

Pick a state or All states. The generator picks one of that state's 3-digit prefixes and adds random digits for the rest of the code. Each US result shows its state name. The codes are realistic in format and prefix, but the last digits are random, so a code may not be a real delivery area. Do not use them to send mail or to check a real address.

// Features

Key Features

Everything you need for perfect generation

Real State Prefixes

Each US code starts with a 3-digit prefix that belongs to the chosen state.

5-Digit and ZIP+4

Get codes in the 12345 form or the 12345-6789 form.

All 50 States and DC

Pick one state, or let the tool mix codes from all of them.

State on Every Result

Each US code shows its state name, so you can match codes to test addresses.

Philippine ZIP Codes

Pick the Philippines in the country list for 4-digit codes.

Copy or Download Text

Copy the codes, or download them as a plain text file.

// Use Cases

Use Cases

Perfect for various applications and industries

🧪

State Match Tests

Check that your form flags a ZIP code that does not match the selected state.

🚚

Shipping and Tax Rules

Test rate tables and tax lookups that depend on the first 3 digits of a ZIP code.

📋

Address Form Fields

Fill 5-digit and ZIP+4 fields with codes in the right format.

📊

Regional Sample Data

Build mock customer lists spread over the states you care about.

// FAQ

Frequently Asked Questions

Everything you need to know about our random zip code generator

The USPS gives each area a set of 3-digit ZIP prefixes. This tool stores the prefixes for every state and DC, and each US code starts with one of them. The last 2 digits and the +4 part are random.

The prefix is real for the state, but the full code is random. Some codes match real delivery areas and some do not. Use them for tests and demos, not to send mail.

ZIP+4 adds a hyphen and 4 more digits to a 5-digit ZIP code, for example 10001-1234. The extra digits point to a smaller delivery segment, such as a building or one side of a street.

The Philippines also calls its 4-digit postal codes ZIP codes. Pick Philippines in the country list to get them. Links made before the state option still work.

Yes. Copy them, or download a text file with one code per line, each with its state, country and format.

Use the Random Postal Code Generator for any other country, such as UK postcodes, Canadian postal codes or German PLZ.
// Pro Tips

Tips & Best Practices

Pro tips to get the most out of this generator

Pick the country first

Each country uses its own digit-and-letter pattern, so set it before generating to get valid formats.

Batch for form testing

Generate many at once to stress-test address validation and shipping-rate lookups.

Format-valid, not deliverable

Codes follow real national patterns but may not map to an actual area — pair with the city generator for fuller addresses.