Thursday, September 29, 2011

Spanish DNI and NIE letter calculator

As I couldn't find this really well done anywhere online, I made a small tool to calculate the letter of the Spanish DNI. For expats living in Spain, you can use it to calculate the letter of a NIE too.

Here it is: Calculadora de letra de DNI y de NIE.

5 comments:

memming said...

Is it like a parity letter for the ID card? What's the context?

Steven Van Vaerenbergh said...

That's exactly what it is. It does a simple modulo calculation. I made this small script because I didn't want to fill out my real ID every time I test a web form :)

Andy said...

how can I generate the NIE number itself?

Steven Van Vaerenbergh said...

@Andy NIE numbers are generated consecutively and assigned in order. AFAIK they are completely handled by the administration.

Unknown said...

good day
Tell me how you can calculate the DNI?
It depends on the initial data, name, date of birth, etc.