How does the DNI work if you are a foreigner?
As a foreigner, you do not get a DNI. You get a NIE, and depending on your status, a TIE or an EU registration certificate as well. That is the whole answer. The DNI only enters your life if you later become a Spanish citizen.
Which means the practical skill is not "how do I get a DNI." It is "what do I do when something asks me for one."
A form, a landlord, or a bank just asked me for my DNI. What do I give them?
In almost every case, you give your NIE. Spanish systems were built around the DNI number, so the word "DNI" is often used loosely to mean "your ID number here." When a foreigner is on the other side of the form, that field takes your NIE.
A few specifics:
- Online forms with only a "DNI" field: enter your NIE. The format is accepted in most systems, even when the label does not say so. Badly built private forms occasionally choke on it, and when that happens the fix is usually a phone call rather than a different number, because the NIE is the only ID number you have.
- In person, asked for "tu DNI": hand over your TIE card if you have one (it shows your photo and NIE), or your passport plus your NIE certificate if you do not.
- A form that genuinely needs a Spanish citizen's DNI, such as certain civil registry or voting procedures, is one you are not eligible for as a non-citizen anyway, so the missing DNI is the answer, not a problem to solve.
Once you stop expecting a DNI and start leading with your NIE, the friction mostly disappears.
Signing documents and proving your identity online without a DNIe
Foreigners cannot get the electronic DNI (DNIe), but you can get the same digital powers another way: through an FNMT digital certificate or the Cl@ve system. This is the part of the DNI story that actually affects your admin life.
Spanish bureaucracy increasingly happens online, and a lot of it expects you to identify yourself and sign electronically the way a Spaniard would with their DNIe chip. The two routes open to foreigners are the FNMT digital certificate, available to foreign residents with a NIE and passport, and Cl@ve, which you can register for with an EU registration certificate, a TIE, or a residence permit. With one of those, you can file taxes, book appointments, and sign official documents from your laptop, no Spanish ID card required.
If sorting that out sounds like one more portal to fight, it is the kind of thing we handle for people through our Spanish digital certificate service, so you get the signing capability without the FNMT website.
When can a foreigner actually get a DNI?
A foreigner can only get a DNI after becoming a Spanish citizen. Once you are naturalised, you use the same DNI process as anyone born Spanish, and your old foreigner documents get handed in along the way.
How long that takes depends entirely on your background. The general route is ten years of legal residence, but there are much shorter paths: commonly two years for nationals of Ibero-American countries, Portugal, Andorra, the Philippines, and Equatorial Guinea, and one year for the spouse of a Spanish citizen, among others. These categories have conditions and exceptions, so treat them as a starting map and confirm your own case before you count on a timeline. The point for this guide is simpler: the DNI is the document at the end of the citizenship road, not something you arrange when you arrive.