IFSC
Validator and formatter for Indian Financial System Codes (IFSC).
IFSC is an 11-character RBI-assigned code identifying a specific bank branch for NEFT, RTGS, IMPS, and UPI transactions.
Format: [A-Z]{4}0[A-Z0-9]{6}
Characters 1–4: bank code (uppercase letters)
Character 5: always
0(reserved by RBI for future use)Characters 6–11: branch code (uppercase alphanumeric)
Accepted input forms (all normalised before validation):
Raw uppercase:
"HDFC0000001"Lowercase:
"hdfc0000001"— normalised to uppercaseMixed case:
"HdFc0000001"— normalised to uppercaseWith spaces:
"HDFC 0000 001"— internal whitespace strippedWhitespace padded:
" HDFC0000001 "— leading/trailing whitespace trimmed
IFSC is a public bank routing code published and distributed by RBI — no mask() method is provided. See the KotIndia API design rationale for details.
This object is stateless and thread-safe. No checksum exists for IFSC — validation is structural (format) only per RBI specification.
Samples
IFSC.validate("HDFC0000001") // ValidationResult.Valid
IFSC.format("hdfc0000001") // "HDFC0000001"