TAN
Validator and formatter for Indian Tax Deduction Account Numbers (TAN).
TAN is a 10-character alphanumeric code issued by the Indian Income Tax Department to entities required to deduct or collect tax at source (TDS/TCS). It is mandatory on all TDS/TCS returns, certificates, and challans. TANs are issued and administered under Section 203A of the Income Tax Act, 1961.
Format: [A-Z]{4}[0-9]{5}[A-Z] — 10 characters total
Characters 1–4: jurisdiction code (uppercase letters, typically city/region abbreviation)
Characters 5–9: five-digit sequential number assigned by the Income Tax Department
Character 10: single uppercase letter (structural check character; no public algorithm exists)
No checksum: The Income Tax Department does not publish a checksum algorithm for TAN. Validation is structural (format) only.
No mask(): TAN is a public business identifier — entities publish their TAN on invoices and tax certificates. No masking is required or provided per KotIndia PII policy (§3.5).
Accepted input forms (all normalised before validation):
Raw uppercase:
"MUMD12345A"Lowercase:
"mumd12345a"— normalised to uppercaseMixed case:
"MumD12345a"— normalised to uppercaseWith spaces:
"MUMD 12345 A"— internal whitespace strippedWhitespace padded:
" MUMD12345A "— leading/trailing whitespace trimmed
This object is stateless and thread-safe.
Samples
TAN.validate("PDES03028F") // ValidationResult.Valid
TAN.format("pdes03028f") // "PDES03028F"