libphonenumber API

Spain Phone Number Format

Country code +34 · ISO ES

How to format, dial, and validate Spain phone numbers, with live examples.

Country Code

+34

National Prefix

International Prefix

00

Mobile Portability

Yes

Try it now

Pre-filled with a valid fixed line number for Spain. Edit it and click "Try It" to see the parsed result.

Number Types & Example Formats

Each Spain phone-number type supported by libphonenumber, with a real example formatted three ways.

Type Length National International E.164
Fixed Line 9 digits 810 12 34 56 +34 810 12 34 56 +34810123456
Mobile 9 digits 612 34 56 78 +34 612 34 56 78 +34612345678
Personal Number 9 digits 701 23 45 67 +34 701 23 45 67 +34701234567
Premium Rate 9 digits 803 12 34 56 +34 803 12 34 56 +34803123456
Shared Cost 9 digits 901 12 34 56 +34 901 12 34 56 +34901123456
Toll Free 9 digits 800 123 456 +34 800 123 456 +34800123456
UAN 9 digits 511 23 45 67 +34 511 23 45 67 +34511234567

How to Dial Spain Numbers

From abroad

Dial +34 followed by the national number.

Dialing out of Spain

Dial 00 followed by the destination country code and number.

Area Codes

Browse Spain area codes with cities, timezones, and example numbers for each.

View Spain area codes →

Validate a Spain Number with the API

Send the number to the free libphonenumber API to get the parsed country, type, formatting, and validity.

Request
curl https://libphonenumberapi.com/api/phone-numbers/+34810123456

Frequently Asked Questions

What is the country code for Spain?

The international country code for Spain is +34. Use this prefix when dialing Spain numbers from another country.

How long is a Spain phone number?

Spain phone numbers are typically 9 digits, not including the +34 country code.

How do I dial a Spain phone number from abroad?

From abroad, dial +34 followed by the national number.

How do I validate a Spain phone number programmatically?

Send a GET request to https://libphonenumberapi.com/api/phone-numbers/<number>. The free libphonenumber API returns the parsed country, format, type, and validity for any number — no API key required.