NIE Generator - Create valid Foreign ID Numbers for testing

This NIE generator creates valid Foreign Identity Numbers randomly. Perfect for developers who need test data for applications that handle documentation of foreign residents in Spain. All generated NIEs comply with official regulations.

Y4702529D
NEW! Now you can generate NIEs from your application using our API. View API documentation →

Our online NIE generator creates valid Foreign Identity Numbers for testing. Ideal for developers who need test NIEs for immigration management applications.

Integrate the NIE generator into your application

Generate NIEs programmatically using our REST API:

PHP


// Generate NIE using the API
$response = file_get_contents('https://letradni.info/api/generate.php?type=generador-nie');
$nie = json_decode($response)->result;
                

Python


import requests

# Generate NIE using the API
response = requests.get('https://letradni.info/api/generate.php?type=generador-nie')
nie = response.json()['result']
                

NIE Generator Features

  • ✓ Generates valid NIEs according to Spanish regulations
  • ✓ REST API available for integration
  • ✓ Up to 10 daily generations per IP
  • ✓ Support for X, Y and Z series
  • ✓ Automatic control digit validation

Need help? Write to us at Write to us at info@letradni.info

Characteristics of the generated NIE

NIE Structure

  • Initial letter: X, Y or Z
  • 7 numbers: Unique numerical sequence
  • Final letter: Verification letter calculated using an algorithm

Generator Uses

  • Software development for immigration management
  • Testing document validation systems
  • Testing foreign resident databases
  • Educational examples on immigration documentation

NIE Series

Generated NIEs can start with three different letters:

  • X: First series of NIEs (oldest)
  • Y: Second series, implemented when X was exhausted
  • Z: Current series, used after exhausting Y

NIE Verification

NIE validation follows a process similar to that of the DNI: NIE validator to instantly verify any NIE number.

Additional information about NIE

The Foreign Identity Number (NIE) is the identification document assigned to foreigners who have a relationship with Spain. For more information, check our complete guide about NIE.

The NIE is essential for multiple procedures in Spain, including:

  • Legal residence
  • Working legally
  • Opening a bank account
  • Tax management

Important Notice: The generated NIEs are technically valid but fictitious. This generator is designed exclusively for software testing and development. It should not be used to impersonate identities or for fraudulent purposes.