Customs · Identifiers

EORI number:
what it is and how
to check it

The EORI number identifies businesses and people to customs. You need one if you import, export, declare, represent or carry goods in a customs declaration. In Spain it is ES followed by the NIF (the Spanish tax ID), up to 17 characters, and the Spanish Tax Agency (AEAT) grants it with census registration (form 036). A company from outside the EU applies to the AEAT if Spain is where it first declares.

All about Customs
Format

What format does
the EORI have in Spain?

ES plus the holder's full NIF, with no spaces. With NIF 89890001K, the EORI is ES89890001K: the example in the AEAT export guide.

Parts of a Spanish EORI. Source: AEAT technical guides for import (H1) and export (AES).
PartRuleExample
Country prefixTwo capital letters. In Spain, ES.ES
IdentifierThe holder's NIF (Spanish tax ID), exactly as it appears in the AEAT census, with its check character.89890001K
LengthUp to 17 characters: the 2 country letters and 1 to 15 more.ES89890001K (11)
CharactersBasic alphabet (ASCII), with the two country letters in capitals. An EORI with accents or in lower case fails the schema.ES89890001K, not es89890001k
Check characterIf the NIF check letter or digit does not match, the number cannot be in the census and the declaration is rejected.AES, reason 103

General information; not advice.

Who needs it

Who needs
an EORI number?

Anyone who appears in a customs declaration in a role that requires it. These are the roles that carry it in each declaration.

  1. 01 Import Single administrative document (DUA, H1). Importer, declarant, representative and exporter go with their EORI: country prefix and up to 17 characters.
  2. 02 Export Automated Export System (AES). Exporter, declarant and representative. In the arrival notification at the customs office of exit, the carrier goes with an EORI with an NIF granted by the AEAT.
  3. 03 Transit New Computerised Transit System (NCTS). Transit holder, representative and carrier. With a Spanish guarantee, the holder goes with an EORI with an NIF, and the representative must be listed in the AEAT register of customs representatives.
  4. 04 Entry Import Control System 2 (ICS2). The entry summary declaration (ENS) identifies the declarant by their EORI, and its cancellation carries the MRN (the number customs gives the declaration) and that same EORI.
  5. 05 Low value Low-value consignments (H7). The direct representative goes with an EORI with an NIF. The declarant can be identified with another identifier.
How to get it

How do you get it and check it?
Four moments, from registration to signature.

  1. Before the first operation

    Census registration with the NIF

    In Spain the AEAT grants the EORI with the NIF through the census declaration (form 036). The resulting number is ES followed by that NIF. A company from outside the EU registers in the Member State where it first lodges a declaration: in Spain, with the AEAT.

  2. When you receive or record it

    Check the format

    ES prefix in capitals, the full NIF and the correct check character. No spaces, accents or lower case, and 17 characters at most.

  3. When lodging

    Check it against the census

    A correct format does not prove the number is registered. Customs checks it against its census when it receives the declaration and rejects an identifier that is invalid or not in the census.

  4. When signing

    A certificate for the same NIF

    Whoever signs the message is identified by their NIF, without the prefix. In ICS2, the certificate used to log in must be issued for the same NIF as the EORI.

Scroll
EORI and NIF

Is the EORI
the same as the NIF?

No. The Spanish EORI contains the NIF, but in the declaration they are two separate data items. Whoever signs the message is identified by their NIF without the prefix (89890001K), and the holder or the carrier by their EORI (ES89890001K). Mixing them up is one of the causes of rejection.

It does not prove anything else either: a correctly written EORI does not prove a representation or a customs authorisation. Nor does a valid NIF make anyone an importer or exporter: each role in the declaration carries its own EORI, stated explicitly.

Check the NIF in the EORI
Frequently asked questions

Frequently asked questions
about the EORI

All about Customs →
What is an EORI number?

The EORI (Economic Operators Registration and Identification) is the number that identifies a business or a person to customs in their declarations: import, export, transit and entry summary declarations. In Spain it is ES followed by the NIF (the Spanish tax ID), and it is granted by the Spanish Tax Agency (AEAT).

What format does the EORI have in Spain?

ES followed by the full NIF, with no spaces: for example, NIF 89890001K gives EORI ES89890001K. In general, an EORI is two country letters and 1 to 15 more characters, up to 17 in total.

Who needs an EORI number?

Anyone who appears in a customs declaration in a role that requires it: importer, exporter, declarant, customs representative, transit holder or carrier, and the declarant of the entry summary declaration in ICS2.

How do I apply for an EORI in Spain?

The AEAT grants it with the NIF through the census declaration, form 036, according to the AEAT NCTS6 transit guide. The result is ES plus that NIF. An EORI issued by another EU country is valid throughout the EU; a company from outside the EU registers in the Member State where it first lodges a declaration, which in Spain means the AEAT.

Are the EORI and the NIF the same thing?

Not quite. The Spanish EORI contains the NIF, but they are separate data items in the declaration: whoever signs the message goes with their NIF without the prefix (89890001K), and the holder or the carrier with their EORI (ES89890001K). That is why it is best to store them in separate fields.

How do I know whether an EORI is valid?

First, the format: country prefix, length and, for a Spanish EORI, the NIF check character. Then the registration: a correct format does not guarantee the number is registered in the census, and customs checks it when it receives the declaration.

Why does the AEAT reject my EORI?

The usual reasons are an NIF check character that does not match, a Spanish EORI without the ES prefix, lower case or accents, or a number that is not in the census. In export, the AEAT returns it with reason 103, “IE_NIF con Formato Erroneo” (NIF with wrong format).

Do I need an electronic certificate as well as the EORI?

To lodge declarations, yes. In ICS2 you log in with a certificate issued for the same NIF as the EORI, and in the AEAT services whoever signs the message is identified by their NIF.

Editorial review: Cofactu team · 25 October 2026. Format, roles and causes of rejection according to the current AEAT technical guides and the ICS2 documentation. AEAT sources are in Spanish. Sources: AEAT · UCC import guide (H1) · AEAT · AES export web services guide · AEAT · Manual for export entry by form (reason 103) · AEAT · NCTS6 transit web services guide v1.20 · AEAT · Entry summary declarations (ENS) · AEAT · Guide to accessing STI-STP · European Commission · Import Control System 2.

Cofactu Customs · Import declaration · Export (AES) · Transit (NCTS) · ICS2 and the ENS declaration · NIF validator

Source: Regulation (EU) 952/2013, Union Customs Code (Official Journal of the EU).

(Start today)

Cofactu Customs is not open to clients yet. You can already invoice with VeriFactu and document your transport from the same account, for free.

Your first invoice

  • Unlimited VeriFactu invoices with QR
  • Unlimited DeCA on the Free plan
  • No card needed