About the X Letter in Spanish Passport Numbers
Recently, while preparing visa applications, I’ve noticed many friends are confused about the X letter that appears after Spanish passport numbers. As someone who has lived in Spain for many years, I’d like to share my experience and knowledge on this topic.
Understanding Spain’s Identity Document Number System
Spain’s identity document numbering system is relatively complex, with different types of documents following different numbering rules. For Spanish citizens, they use DNI numbers, which typically follow the format of 8 digits plus 1 letter. However, for foreigners with Spanish visa passports, the situation is much more diverse.

Foreigners in Spain primarily use NIE numbers, which follow this format: X/Y/Z + 7 digits + 1 letter. The initial X, Y, or Z letters are what confuse many people. X is typically assigned to foreigners who obtained their NIE earliest, Y is assigned to later applicants, and Z is assigned to even later applicants.
Number Formats for Different Document Types
| Document Type | Number Format | Applicable Population |
| DNI | 8 digits + letter | Spanish citizens |
| NIE | X/Y/Z + 7 digits + letter | Foreign residents |
| Passport | Letter-number combination | All holders |
It’s important to note that the X in NIE numbers is not randomly added - it has specific meaning and allocation rules. When filling out various forms or application documents, you must include the complete number including the initial letter.
Common Issues in Visa Applications
When applying for various visas, passport number entry errors frequently occur. The most common problem is omitting or incorrectly writing the initial letter. Some people think the X is just a formatting symbol, but it’s actually an essential part of the number. Understanding passport copy requirements is crucial for proper documentation.
Whether applying for Schengen visas, work visas, or student visas, you must accurately fill in the complete document number. I recommend carefully checking the original document before filling out forms to ensure every character is correct. If you’ve experienced lost old passport issues, incorrect number entry could result in visa application rejection or processing delays.
Practical Advice and Important Considerations
Based on my experience, I recommend maintaining high accuracy when handling any identity document-related matters. Keep a copy of your documents with you so you won’t make mistakes when filling out numbers.
If your NIE number starts with X, you might encounter format validation issues in some online systems. In such cases, try contacting the relevant department’s customer service to explain the situation and seek assistance. Remember, accurate document information is the foundation of all official procedures - never treat it carelessly.