Provinces by zipcode (ES)
What this tool does
This tool finds the Spanish provinces that correspond to the first few digits of a postal code. You enter a starting number for the code, and the system returns a list of all province names that match that prefix in Spain.
Keep in mind that this is a lookup based on the provided prefix, so the results depend entirely on the postal code database available. If you enter an invalid or unmatched prefix, the list may be empty.
Common uses
- Finding which provinces share the start of a postal code
- Validating the beginning of a Spanish postal code
- Filling in province names from partial postal code data
Input data
| Parameter | Required | Example | Description |
|---|---|---|---|
zipcode | Yes | 0 | Enter the first 1 to 3 digits of the Spanish postal code you want to check (for example, enter 2 for codes starting with 20000). This is required. |
Output data
| Field | Description |
|---|---|
name | The name of a province (for example, 'Madrid') that matches the postal code prefix you entered. |