Aadhaar Number Formatter
TextFormat raw Aadhaar numbers into the standard XXXX XXXX XXXX spacing, with an option to mask the first 8 digits per UIDAI guidelines. Runs in your browser.
What is a Aadhaar?
An Aadhaar Number Formatter takes a raw, unformatted 12-digit Aadhaar number and applies the standard display convention โ grouped into three sets of four digits, separated by spaces or hyphens. Aadhaar numbers are frequently entered or stored as a continuous 12-digit string in spreadsheets, forms, or databases, but most documents and display contexts expect the conventional grouped format for readability.
This formatter also supports generating a "masked Aadhaar" โ showing only the last 4 digits, as recommended by UIDAI for situations where the number needs to be displayed but full visibility isn't necessary. It's a formatting tool only โ for checking whether a number is structurally valid, use the Aadhaar Validator.
How to use this Aadhaar calculator
- Paste one or more Aadhaar numbers into the Raw Aadhaar Input field, one per line.
- Select your preferred Output Format โ spaced, hyphenated, or unformatted.
- Toggle Mask first 8 digits on if you need the privacy-preserving masked version.
- Read the formatted result for each line in the output panel.
- Check for any "Error" lines, which indicate an input that didn't have exactly 12 digits, and correct the source data.
Formula & Methodology
The formatter strips all non-digit characters from each line, confirms the result is exactly 12 digits, then re-inserts separators at fixed positions. Before:234123412346After (spaced):2341 2341 2346After (masked, spaced):XXXX XXXX 2346No digits are altered โ only the separators and, optionally, the visibility of the first 8 digits change. For background on the underlying term, see our glossary entry on Aadhaar.
Frequently Asked Questions