Homeโ€บFormattersโ€บTextโ€บAadhaar Number Formatter

Aadhaar Number Formatter

Text

Format 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

  1. Paste one or more Aadhaar numbers into the Raw Aadhaar Input field, one per line.
  2. Select your preferred Output Format โ€” spaced, hyphenated, or unformatted.
  3. Toggle Mask first 8 digits on if you need the privacy-preserving masked version.
  4. Read the formatted result for each line in the output panel.
  5. 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: 234123412346

After (spaced): 2341 2341 2346

After (masked, spaced): XXXX XXXX 2346

No 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

An Aadhaar number is a 12-digit unique identification number issued by UIDAI, conventionally displayed in three groups of four digits separated by spaces โ€” for example, 2341 2341 2346. This formatter applies that standard spacing automatically to a raw, unformatted 12-digit number.
A masked Aadhaar hides the first 8 digits, showing only the last 4 digits (displayed as XXXX XXXX 1234), which UIDAI recommends for situations where an Aadhaar number must be shared or displayed but full visibility isn't necessary. This formatter includes a toggle to generate this masked version automatically.
No โ€” this is a formatting tool, not a validator. It only adds spacing or hyphens to a 12-digit number you provide; it does not check the Verhoeff checksum that real Aadhaar numbers use. Use the [Aadhaar Validator](/aadhaar-validator/) if you need to check whether a number is structurally valid.
Yes โ€” enter one number per line in the input box, and the formatter processes each line independently, showing the formatted result (or an error if a line doesn't have exactly 12 digits) on its own corresponding output line.
The formatter strips all non-digit characters before reformatting, so a number entered as '2341-2341-2346' or '2341 2341 2346' is normalised the same way as a continuous 12-digit string. This means you can paste Aadhaar numbers from almost any source format.
Different forms, documents, or systems expect different conventions โ€” some require the standard spaced format, others expect hyphens, and data import systems often need the digits with no separators at all. This formatter supports all three so you can match whatever the destination requires.
No โ€” given how sensitive Aadhaar numbers are, this is especially important: all formatting happens entirely in your browser using JavaScript. Nothing you type is sent to a server, logged, or stored anywhere.
UIDAI's masked Aadhaar standard specifically preserves the last 4 digits as a partial identifier for verification purposes while hiding the rest, which is why this formatter masks the first two groups and leaves the final group of 4 digits visible.
An error means the line you entered didn't have exactly 12 digits after non-digit characters were stripped out. Double-check the original number for a missing or extra digit and re-enter it.
Also known as
format Aadhaar numberAadhaar XXXX XXXX XXXXmask Aadhaar numbermasked Aadhaar generatorAadhaar number spacing