Skip to content

๐Ÿ’ณ Offline BIN database with 9,000+ verified entries. No API required! Fast SQLite lookup for credit/debit card validation.

Notifications You must be signed in to change notification settings

DAXXTEAM/bin-database-offline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ณ BIN Database - Offline Checker

Complete offline BIN (Bank Identification Number) database with 9,600+ verified entries.

No API required! Fast, local SQLite database with Python lookup tools.


๐Ÿš€ Features

โœ… 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


๐Ÿ“Š Database Stats

Metric Count
Total BINs 9,639
Countries 40+
Brands 7 (Visa, MC, Amex, RuPay, Discover, Maestro, UnionPay)
Banks 200+ major banks

Coverage by Country

๐Ÿ‡บ๐Ÿ‡ธ USA โ€ข ๐Ÿ‡ฎ๐Ÿ‡ณ India โ€ข ๐Ÿ‡ฌ๐Ÿ‡ง UK โ€ข ๐Ÿ‡จ๐Ÿ‡ฆ Canada โ€ข ๐Ÿ‡ฏ๐Ÿ‡ต Japan โ€ข ๐Ÿ‡ง๐Ÿ‡ท Brazil โ€ข ๐Ÿ‡ฆ๐Ÿ‡บ Australia โ€ข ๐Ÿ‡ซ๐Ÿ‡ท France โ€ข ๐Ÿ‡ฉ๐Ÿ‡ช Germany โ€ข ๐Ÿ‡ช๐Ÿ‡ธ Spain โ€ข ๐Ÿ‡ฒ๐Ÿ‡ฝ Mexico โ€ข ๐Ÿ‡ท๐Ÿ‡บ Russia โ€ข ๐Ÿ‡จ๐Ÿ‡ณ China โ€ข ๐Ÿ‡ฐ๐Ÿ‡ท South Korea โ€ข ๐Ÿ‡ธ๐Ÿ‡ฌ Singapore โ€ข ๐Ÿ‡ฆ๐Ÿ‡ช UAE โ€ข ๐Ÿ‡ธ๐Ÿ‡ฆ Saudi Arabia โ€ข And 30+ more!


โšก Quick Start

1. Clone Repository

git clone https://github.com/DAXXTEAM/bin-database-offline.git
cd bin-database-offline

2. Use Checker

# 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

๐Ÿ“– Usage Examples

Basic Lookup

$ python3 bin_checker.py 511416

Output:

======================================================================
๐Ÿ’ณ BIN: 511416
======================================================================
Brand:        MASTERCARD
Type:         DEBIT
Level:        PLATINUM
Bank:         ICICI BANK LIMITED
Country:      India (IN)
Currency:     INR
Valid:        โœ… Yes
======================================================================

Python Integration

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()

๐Ÿ Python Import

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']}")

๐Ÿ“ File Structure

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

๐Ÿ› ๏ธ Requirements

  • Python 3.6+
  • SQLite3 (built-in with Python)

No external dependencies! Pure Python stdlib only.


๐Ÿ” Database Schema

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
);

๐Ÿ’ณ Supported Brands

  • 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)

๐ŸŒ Major Banks Included

India ๐Ÿ‡ฎ๐Ÿ‡ณ

  • State Bank of India (SBI)
  • HDFC Bank
  • ICICI Bank
  • Axis Bank
  • Kotak Mahindra Bank
  • And 50+ more

USA ๐Ÿ‡บ๐Ÿ‡ธ

  • JPMorgan Chase
  • Bank of America
  • Wells Fargo
  • Citibank
  • Capital One
  • And 100+ more

Worldwide ๐ŸŒ

  • HSBC (UK)
  • Barclays (UK)
  • Scotiabank (Canada)
  • Santander (Spain/Brazil)
  • And 100+ international banks

๐Ÿ”ง Advanced Features

Bulk Lookup

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'}")

Export to CSV

sqlite3 bin_database.db -header -csv "SELECT * FROM bins" > bins_export.csv

Add Custom BINs

import 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()

๐Ÿ“ License

MIT License - Free to use, modify, and distribute.


๐Ÿค Contributing

Contributions welcome! To add more BINs:

  1. Fork the repository
  2. Add BINs to database
  3. Test with python3 bin_checker.py --stats
  4. Submit pull request

โš ๏ธ Disclaimer

This database is for educational and development purposes. BIN data is sourced from public information. Always verify critical data with official sources.


๐Ÿ”— Resources


๐Ÿ“ง Contact

Issues? Questions? Open an issue on GitHub!


๐Ÿ”„ Changelog

v1.1.0 (Latest)

  • โœ… Added 563 new BINs
  • โœ… Total: 9,639 BINs
  • โœ… 40+ countries coverage
  • โœ… 200+ banks included

v1.0.0

  • ๐ŸŽ‰ Initial release
  • โœ… 9,093 BINs
  • โœ… 4 countries

โญ Star this repo if you find it useful!

Made with โค๏ธ for developers who need offline BIN validation.

About

๐Ÿ’ณ Offline BIN database with 9,000+ verified entries. No API required! Fast SQLite lookup for credit/debit card validation.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published