ZIP code lookup
Find your ZIP code from your location or coordinates, or search a US ZIP to see its city, state, county, and time zone. This postal code lookup accepts five digits or a hyphenated ZIP+4.
What your ZIP lookup results mean
Use your location or enter coordinates to find an estimated ZIP code. This matches the point to a geographic ZIP area. A building's mailing ZIP code can differ, so use its full address when checking a delivery or ZIP+4 code.
The city is the place name held in the postal record. It may differ from a neighborhood name or the city written on a particular address.
A time zone such as America/New_York identifies the local-time rules. Coordinates describe a point associated with the ZIP, rather than the location of every address inside it.
ZIP codes can cross county lines
A ZIP code search returns one county associated with the postal record. ZIP codes can cross city and county lines. To find the county at your exact coordinates, use What county am I in?
Build a ZIP code lookup
Postal supplies the place profile for a known ZIP. To accept coordinates too, first match the point to the Census ZIP area and clearly identify that result as an estimate.
- Accept a five-digit ZIP, ZIP+4, or latitude and longitude.
- For coordinates, require a single Census area match instead of guessing a nearby ZIP.
- Look up that ZIP with Postal and render available profile fields.
Installation steps are included in each example. Set PARSEAPI_KEY on your server. Swift and Kotlin use an app key restricted to your app ID.
// npm install @parseapi/sdk@1.14.0
import { parseAPI } from '@parseapi/sdk';
// Set PARSEAPI_KEY on your server.
const parse = parseAPI();
const input = '28202'; // Also accepts: '42.357,-71.0637'
let zip = input.trim().match(/^(\d{5})(?:-\d{4})?$/)?.[1];
let estimated = false;
if (!zip) {
const pair = input.split(',').map(value => Number(value.trim()));
const [latitude, longitude] = pair;
if (pair.length !== 2 || !input.split(',').every(value => value.trim()) ||
!Number.isFinite(latitude) || Math.abs(latitude) > 90 ||
!Number.isFinite(longitude) || Math.abs(longitude) > 180) throw new Error('Invalid ZIP or coordinates.');
const endpoint = 'https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/PUMA_TAD_TAZ_UGA_ZCTA/MapServer/1/query';
const query = new URLSearchParams({ f: 'json', geometryType: 'esriGeometryPoint',
geometry: JSON.stringify({ x: longitude, y: latitude, spatialReference: { wkid: 4326 } }),
inSR: '4326', spatialRel: 'esriSpatialRelIntersects', outFields: 'ZCTA5', returnGeometry: 'false' });
const response = await fetch(endpoint, { method: 'POST', body: query,
signal: AbortSignal.timeout(10000) });
if (!response.ok) throw new Error('ZIP area lookup unavailable.');
const areas = await response.json();
if (areas.error || !Array.isArray(areas.features) || areas.exceededTransferLimit) {
throw new Error('ZIP area lookup unavailable.');
}
const matches = [...new Set((areas.features ?? []).map(row => row.attributes?.ZCTA5)
.filter(value => typeof value === 'string' && /^\d{5}$/.test(value)))];
if (matches.length !== 1) throw new Error('No single ZIP area match. Enter a ZIP instead.');
zip = matches[0]; estimated = true;
}
const profile = await parse.postal(zip, { country: 'US', deep: true });
console.log({ estimated, ...profile });
// deep=true adds available plan detail; keep nulls and numeric zero distinct.
// A geographic ZIP estimate can differ from a building's mailing ZIP.
Get coordinates in the browser (HTTPS or localhost)
<!doctype html>
<html lang="en"><meta charset="utf-8"><title>Get coordinates</title>
<button id="locate">Use my location</button><pre id="result"></pre>
<script type="module">
const output = document.querySelector('#result');
document.querySelector('#locate').onclick = () => {
if (!navigator.geolocation) { output.textContent = 'Enter coordinates manually.'; return; }
navigator.geolocation.getCurrentPosition(({ coords }) => {
// Send these numbers to your own server's lookup handler.
output.textContent = JSON.stringify({
latitude: coords.latitude, longitude: coords.longitude,
}, null, 2);
}, () => { output.textContent = 'Location unavailable. Enter coordinates manually.'; },
{ timeout: 10000, maximumAge: 60000 });
};
</script></html>What is my ZIP code?
Select Use my location, or enter latitude and longitude, to find an estimated ZIP code for where you are. To find the ZIP code used to deliver mail to a specific address, use USPS ZIP Code Lookup with the street address, city, and state.
Why does my location show a different ZIP code?
Your browser location can be imprecise, especially indoors or on a computer without GPS. Location results also use geographic ZIP areas, which can differ from postal delivery routes. For mailing or billing, confirm the ZIP for the full street address.
What is a postal code?
A postal code helps route and deliver mail. In the United States, the postal code is called a ZIP code. If a US address form asks for a postal code, enter your ZIP code.
What is my full ZIP code?
A full ZIP+4 code has five digits, a hyphen, and four extra digits, such as 12345-6789. Use the complete delivery address, including an apartment or suite where applicable, in USPS ZIP Code Lookup to find the extension. This tool uses the first five digits and does not generate ZIP+4 codes.
What does ZIP stand for?
ZIP stands for Zone Improvement Plan, the US Postal Service's system for routing mail.
Can a ZIP code start with zero?
Yes. Codes such as 00501 begin with zero. Keep all five digits, and store ZIP codes as text in spreadsheets so a leading zero is preserved.
Why is my ZIP code invalid?
This search accepts five-digit US ZIP codes or a hyphenated ZIP+4. Check for a missing leading zero or a mistyped digit. If the format is correct but no record appears, confirm the code against the full mailing address.
Can I look up a spreadsheet of ZIP codes?
Yes. Use /bulk to add city, state, county, time-zone, and available coordinate fields to a ZIP-code column in a file. Include the country when the file contains international postal codes.