NIF is valid (ES)
What this tool does
This tool checks whether a Spanish tax identification number, known as a NIF or DNI, is correctly formatted and valid. It helps you ensure that customer or client records contain accurate identification details before processing. This prevents errors in administrative or financial data.
When to use it
- Verifying the identity of a new Spanish customer during registration.
- Cleaning up existing customer lists to remove invalid tax numbers.
- Validating forms before submitting tax-related information.
- Checking personal identification details in internal records.
What to expect
You will receive a simple result indicating whether the provided number is recognized as valid. This allows you to quickly confirm the accuracy of the identification data.
Limitations
- This tool only works for Spanish tax identification numbers. It does not validate numbers from other countries.
- It checks the format and mathematical validity of the code. It does not verify if the number is currently active or assigned to a living person.
- The input must be a complete identifier. Partial numbers or those missing the final letter check will be marked as invalid.
When it fails
- The provided text is too short or missing characters.
- The number does not follow the required Spanish format with a letter at the end.
- The final letter does not match the expected value for the given digits.
Good to know
- Always enter the identification number without spaces or special characters.
- If the tool marks a number as invalid, double-check the digits and the final letter for typos.
Input data
| Parameter | Required | Example | Description |
|---|---|---|---|
nif | Yes | 44016116G | Enter the 9-character Spanish tax identification number as text (e.g. '44016116G'). This field is required. If the number is too short, contains letters in the wrong place, or has an incorrect check letter, the tool will indicate it is invalid. |
Output data
| Field | Description |
|---|---|
result | Returns 'true' if the NIF format and check digit are correct, or 'false' if they are not. For example, it returns 'true' for a valid format like '44016116G' and 'false' for an invalid one like '44016116M'. |