A Python utility to convert Microsoft Access databases (.accdb, .mdb) to SQLite format on MS Windows systems.
- Lightweight executable (~13 MB) - Optimized build without heavy dependencies
- Converts Microsoft Access databases (.accdb, .mdb) to SQLite format
- Handles both Access 2003 (.mdb) and Access 2007+ (.accdb) formats
- Processes tables in chunks to handle large databases efficiently
- Preserves table structure and data types
- Command-line interface with multiple options
- Automatic Access ODBC driver detection with helpful error messages
- Robust error handling with partial conversion support
- Thread-safe cancellation in GUI mode
- Detailed conversion summaries showing successful and failed tables
Install the required dependencies:
pip install pyodbcFor the Python scripts (optional pandas-based legacy version):
pip install pyodbc pandasA graphical user interface version is available as an executable file for easy use without Python installation:
The GUI version provides the same functionality with a user-friendly interface for drag-and-drop conversion.
python access2sqlite.py database.accdbThis will create database.sqlite in the same directory.
python access2sqlite.py database.accdb --output converted.sqlitepython access2sqlite.py database.accdb --chunk-size 500python access2sqlite.py database.accdb --infoThis displays table names and record counts without converting.
python access2sqlite.py database.accdb --verbose--output, -o- Specify output SQLite file path (default: same as input with .sqlite extension)--chunk-size, -c- Number of rows to process at once (default: 1000)--info, -i- Show database information without converting--verbose, -v- Enable verbose logging
- Python 3.6+
- pyodbc (for Access database connectivity)
- pandas (for data processing)
- sqlite3 (built into Python)
The converter includes comprehensive error handling for:
- Missing Access database files
- Invalid file formats
- Database connection issues
- Table conversion failures
- Missing Microsoft Access ODBC drivers (with helpful installation instructions)
- Resource cleanup on errors (connections properly closed)
Partial Conversion Support: If some tables fail to convert, the tool will:
- Continue converting remaining tables
- Keep the partial SQLite database
- Log a detailed summary showing which tables succeeded and which failed
- Report specific error messages for each failed table
- The converter requires Microsoft Access Database Engine to be installed on Windows for pyodbc to work with Access files
- The tool will detect if the driver is missing and provide download instructions
- Download from: https://www.microsoft.com/en-us/download/details.aspx?id=54920
- Large databases are processed in chunks to prevent memory issues
- All tables in the Access database are converted automatically
- The converter preserves data types and table structure as much as possible
- Tables with an ID column are paginated efficiently; tables without ID columns are read in full
- SQL syntax is optimized for Microsoft Access compatibility (uses TOP instead of LIMIT)