Complete offline BIN (Bank Identification Number) database with 9,600+ verified entries.
No API required! Fast, local SQLite database with Python lookup tools.
โ
9,639 BINs - Verified bank identification numbers
โ
100% Offline - No API keys or internet required
โ
Fast Lookup - SQLite database with indexes
โ
40+ Countries - Worldwide coverage
โ
Multiple Brands - Visa, Mastercard, Amex, RuPay, Discover, Maestro, UnionPay
โ
Rich Data - Bank name, country, currency, phone, website
โ
JSON Export - Easy integration
โ
Search Options - By BIN, brand, country, bank
| Metric | Count |
|---|---|
| Total BINs | 9,639 |
| Countries | 40+ |
| Brands | 7 (Visa, MC, Amex, RuPay, Discover, Maestro, UnionPay) |
| Banks | 200+ major banks |
๐บ๐ธ USA โข ๐ฎ๐ณ India โข ๐ฌ๐ง UK โข ๐จ๐ฆ Canada โข ๐ฏ๐ต Japan โข ๐ง๐ท Brazil โข ๐ฆ๐บ Australia โข ๐ซ๐ท France โข ๐ฉ๐ช Germany โข ๐ช๐ธ Spain โข ๐ฒ๐ฝ Mexico โข ๐ท๐บ Russia โข ๐จ๐ณ China โข ๐ฐ๐ท South Korea โข ๐ธ๐ฌ Singapore โข ๐ฆ๐ช UAE โข ๐ธ๐ฆ Saudi Arabia โข And 30+ more!
git clone https://github.com/DAXXTEAM/bin-database-offline.git
cd bin-database-offline# Lookup a BIN
python3 bin_checker.py 510377
# Search by brand
python3 bin_checker.py --brand mastercard
# Search by country
python3 bin_checker.py --country IN
# Get statistics
python3 bin_checker.py --stats$ python3 bin_checker.py 511416Output:
======================================================================
๐ณ BIN: 511416
======================================================================
Brand: MASTERCARD
Type: DEBIT
Level: PLATINUM
Bank: ICICI BANK LIMITED
Country: India (IN)
Currency: INR
Valid: โ
Yes
======================================================================
from bin_checker import BINChecker
# Initialize
checker = BINChecker()
# Lookup BIN
result = checker.lookup('510377')
print(f"Bank: {result['bank']}")
print(f"Country: {result['country']}")
# Search by country
india_cards = checker.search_by_country('IN')
# Get stats
stats = checker.get_stats()
print(f"Total BINs: {stats['total']:,}")
# Close connection
checker.close()from bin_checker import BINChecker
# Context manager (auto-close)
with BINChecker() as checker:
result = checker.lookup('460223')
if result:
print(f"{result['brand']} - {result['bank']}")bin-database-offline/
โโโ README.md # This file
โโโ bin_checker.py # Lookup tool
โโโ bin_database.db # SQLite database (9,639 BINs)
โโโ build_database.py # Database builder
โโโ test.sh # Test script
โโโ .gitignore # Git ignore rules
- Python 3.6+
- SQLite3 (built-in with Python)
No external dependencies! Pure Python stdlib only.
CREATE TABLE bins (
bin TEXT PRIMARY KEY,
brand TEXT NOT NULL,
type TEXT NOT NULL,
level TEXT,
bank TEXT,
country TEXT NOT NULL,
country_code TEXT NOT NULL,
currency TEXT,
website TEXT,
phone TEXT,
prepaid BOOLEAN DEFAULT 0,
valid BOOLEAN DEFAULT 1,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);- VISA - 2,200+ BINs
- MASTERCARD - 2,200+ BINs
- AMERICAN EXPRESS - 1,600+ BINs
- RUPAY - 1,650+ BINs (India domestic)
- DISCOVER - 900+ BINs
- MAESTRO - 1,600+ BINs
- UNIONPAY - 100+ BINs (China)
- State Bank of India (SBI)
- HDFC Bank
- ICICI Bank
- Axis Bank
- Kotak Mahindra Bank
- And 50+ more
- JPMorgan Chase
- Bank of America
- Wells Fargo
- Citibank
- Capital One
- And 100+ more
- HSBC (UK)
- Barclays (UK)
- Scotiabank (Canada)
- Santander (Spain/Brazil)
- And 100+ international banks
bins = ['510377', '511416', '534444']
for bin_num in bins:
result = checker.lookup(bin_num)
print(f"{bin_num}: {result['bank'] if result else 'Not found'}")sqlite3 bin_database.db -header -csv "SELECT * FROM bins" > bins_export.csvimport sqlite3
conn = sqlite3.connect('bin_database.db')
cursor = conn.cursor()
cursor.execute('''
INSERT INTO bins (bin, brand, type, bank, country, country_code, currency, valid)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
''', ('999999', 'VISA', 'CREDIT', 'MY BANK', 'India', 'IN', 'INR', 1))
conn.commit()
conn.close()MIT License - Free to use, modify, and distribute.
Contributions welcome! To add more BINs:
- Fork the repository
- Add BINs to database
- Test with
python3 bin_checker.py --stats - Submit pull request
This database is for educational and development purposes. BIN data is sourced from public information. Always verify critical data with official sources.
- ISO/IEC 7812 - Card numbering standard
- Payment Card Industry - PCI standards
Issues? Questions? Open an issue on GitHub!
- โ Added 563 new BINs
- โ Total: 9,639 BINs
- โ 40+ countries coverage
- โ 200+ banks included
- ๐ Initial release
- โ 9,093 BINs
- โ 4 countries
โญ Star this repo if you find it useful!
Made with โค๏ธ for developers who need offline BIN validation.