Skip to content
Distance & area

Spain postal codes in a radius

Pick a point in Spain and a radius to get every postal code (código postal) inside, with its municipality and province, on the map and in a list you can open in Excel.

By the All Map Tools Team

Center of the circle
or click on the mapor tap the map

From the UK, Canada, Australia, Spain or the US: the center moves to that code’s point.

On the map

Loading the map…

Drag the edge of the circle to change the radius, or its center to move it.

Loading data for this area…

 

List
Direction

What’s inside this radius?

Open the same circle in another tool, no need to search again.

How to use it

Search for an address or a town, use your location or tap the map to set the center, then choose the radius with the slider, by typing a number or with the quick values. The list is sorted from nearest to farthest; tap a code to see it on the map.

“Copy the codes” gives you the list with commas or one per line, ready to paste into a form or a spreadsheet. Download CSV adds the town, the municipality with its INE code, the province, the distance and the coordinates. The link keeps the center and the radius.

Turn on “Postal code boundaries” and zoom in on a town to see where each code runs, as CartoCiudad draws it.

3 km around Puerta del Sol

Within 3 km (1.9 miles) of Puerta del Sol, the center of Madrid, there are 15 postal codes. The closest are 28013, 28012 and 28014. In a big city each code covers just a few neighborhoods, so even a small radius catches many.

Where each postal code’s point comes from

Spanish postal code boundaries are drawn by Correos, the postal service, and belong to it. Spain’s National Geographic Institute (IGN) shows them on the CartoCiudad map, but a 2023 agreement between the two only allows viewing and querying them: they can’t be downloaded or used as data. So this tool doesn’t calculate with them.

What is open is the electoral roll street list from Spain’s statistics institute (INE), which gives the postal code of every street segment in the country. We place each code at the center of its streets: in cities, using the census tracts those streets are in; in villages, using the IGN’s population centers. That gives 10,782 postal codes, with the street list as of June 30, 2025.

A code counts when its point is inside the radius, and the distance is to that point. We checked 160 points picked at random against the CartoCiudad map: 153 fall inside their own code, and the other 7, all rural, in the code next door.

One postal code, several municipalities

A Spanish postal code isn’t a municipality. 1,872 codes have streets in more than one, and 42180 reaches 10, starting with Almajano. Big cities, on the other hand, have dozens of codes. Each row shows the municipality with the most streets in that code and how many more it shares; the CSV lists them all.

The first two digits are the province (28 Madrid, 08 Barcelona), with a few exceptions: the Condado de Treviño, part of Burgos, uses Álava’s codes.

What it’s for

Setting a delivery or service area (“we cover 10 km around the shop”), planning a leaflet drop or an ad campaign by postal code, splitting territory between sales reps, or checking which codes a shipping rate covers. If you need municipalities with their population instead, use Municipalities in a radius.

Postal codes in a radius in other countries

The same tool with each country’s open data.

Frequently asked questions

Why don’t you draw each postal code’s area?

The boundaries belong to Correos and can only be viewed on CartoCiudad’s services, not downloaded. Turn on “Postal code boundaries” and zoom in to see them; the list uses one point per code.

Does a code count if only part of it is inside the circle?

No: it counts when its point, the center of its streets, is inside. A large rural code whose edge crosses the circle may be left out; make the radius a little bigger to catch it.

Why are PO box codes missing?

They have no streets. Codes ending in 070, 071 or 080 (PO boxes, post offices and large organizations) aren’t in the INE street list.

How recent is the data?

It’s the INE electoral roll street list as of June 30, 2025, published twice a year. Codes created or changed since then won’t show up until the next update.

Is the distance a straight line?

Yes, from the center of the circle to each code’s point, on the WGS84 ellipsoid. Driving distances are always a bit longer.

What about the US?

For the United States there’s ZIP codes in a radius, with each ZIP code’s area, its population and the option to count the ones the circle only touches.

Related tools

All tools

Sources