NIE is valid (ES)
What this tool does
This tool checks if a Spanish Non-Citizen Identity Number is structured correctly. It helps you ensure that the identification number you have recorded follows the official rules. This is useful for cleaning up customer records or verifying new entries.
When to use it
- Verifying the format of a Spanish NIE before saving it to your database.
- Cleaning up a list of customer records to find incorrectly typed identification numbers.
- Checking if a new client has provided a correctly formatted Spanish ID.
- Validating data imported from external sources to ensure consistency.
What to expect
You will receive a simple yes or no answer. A yes means the number is valid, while a no means it is not.
Limitations
- This tool only checks the structure of the number. It does not verify if the number is actually assigned to a specific person.
- The tool works with both standard NIE formats and the equivalent NIF formats.
- It does not check against any official government registry or database.
When it fails
- If the input is left blank.
- If the text does not contain exactly nine characters followed by one letter.
- If the first character is not X, Y, or Z.
- If the remaining characters do not form a valid numeric sequence.
Good to know
- You can enter the letter at the beginning or end, as the system accepts both common variations.
- The system automatically handles the conversion of initial letters X, Y, and Z to their numeric equivalents.
Input data
| Parameter | Required | Example | Description |
|---|---|---|---|
nie | Yes | Y2918527W | Enter the NIE number as plain text (e.g., Y2918527W). It must include the initial letter, followed by 7 digits, and ending with a check letter. |
Output data
| Field | Description |
|---|---|
result | Returns 'true' if the NIE structure is correct, or 'false' if it is invalid. Example: true |