India IFSC Code Validation

An IFSC (Indian Financial System Code) is the eleven-character code that identifies a bank branch in India. It is required for every domestic electronic transfer made through NEFT, RTGS and IMPS, and it is printed on cheque leaves and passbooks.

An IFSC always has the same shape: four letters for the bank, a zero, and six characters for the branch.

For example, IFSC code ABHY0065022:

  • ABHY - bank code (Abhyudaya Co-operative Bank)
  • 0 - reserved character, always the digit zero
  • 065022 - branch code, usually numeric but letters are allowed

The IFSC is different from the nine-digit MICR code also printed on Indian cheques. MICR codes are used for cheque clearing and can't be used to route an electronic transfer.

What the API checks

  • Format - four letters, the digit 0, then six letters or digits. Input is converted to upper case first, so abhy0065022 is accepted. Anything else returns 400 Invalid IFSC.
  • Existence - the code must be listed by the Reserve Bank of India. A well-formed code for a closed or never-issued branch returns 404.

IFSCs have no check digit, so the directory lookup is what catches typos. The API validates the branch code only; Indian account numbers vary in length by bank and aren't checked.

How to validate an IFSC code

To start using our Fin Codes API sign up here and create your API key. Pass this key as a bearer token in the Authorization HTTP header, e.g. Authorization: Bearer your-api-key-here.

To validate an IFSC code call /v2/ifsc/{ifsc_code} endpoint using HTTP client of your preference, i.e.:

curl 'https://api.fincodesapi.com/v2/ifsc/ABHY0065022' \
    --header 'Authorization: Bearer your-api-key-here' \
    --header 'Accept: application/json'
# INSTALLATION
$ composer require guzzlehttp/guzzle
# REQUEST
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fincodesapi.com/v2/ifsc/ABHY0065022', [
    'headers' => [
        'Accept' => 'application/json',
        'Authorization' => 'Bearer your-api-key-here',
    ],
]);

echo $response->getBody();
# INSTALLATION
$ python -m pip install requests
# REQUEST
import requests

url = "https://api.fincodesapi.com/v2/ifsc/ABHY0065022"

headers = {
    "Accept": "application/json",
    "Authorization": "Bearer your-api-key-here"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
# INSTALLATION
$ npm install node-fetch --save
// REQUEST
import fetch from 'node-fetch';

const url = 'https://api.fincodesapi.com/v2/ifsc/ABHY0065022';
const options = {
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer your-api-key-here'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
const options = {
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer your-api-key-here'
  }
};

fetch('https://api.fincodesapi.com/v2/ifsc/ABHY0065022', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

The response should be:

{
    "success": true,
    "data": {
        "id": "ABHY0065022",
        "branch_name": "CBD BELAPUR",
        "branch_code": "065022",
        "address": "SECTOR-3, CHANAKYA SHOPPING CENTRE, BELAPUR (CBD), NAVI MUMBAI-400614",
        "district": "GREATER MUMBAI",
        "city": "MUMBAI",
        "state": "MAHARASHTRA",
        "std": "22",
        "phone": "27572179",
        "bank": {
            "id": "1bc55546-de33-478a-a9d7-745d0b2567eb",
            "country_id": "IN",
            "code": "ABHY",
            "name": "ABHYUDAYA COOPERATIVE BANK LIMITED"
        }
    }
}

Response fields

  • id - the IFSC in upper case
  • branch_name and branch_code - the branch and the last six characters of the IFSC
  • address, district, city, state - where the branch is located
  • std and phone - the branch's STD dialling code and phone number
  • bank - the bank identified by the first four letters

Common mistakes

  • Letter O instead of zero - the fifth character is always the digit 0. Codes typed as ABHYO065022 are rejected.
  • Codes from merged banks - after bank mergers, branches of the absorbed bank receive new IFSCs and the old codes are withdrawn. Customers often still quote the old code from an old cheque book.
  • Mixing up IFSC and MICR - an all-numeric nine-digit code is a MICR code, not an IFSC.

Where the data comes from

IFSC data is imported from the branch lists published by the Reserve Bank of India for NEFT and RTGS and is refreshed weekly.

You can find full documentation here.