mdb-to-sqlite
v1.0.2
Published
Convert .mdb (Microsoft Access) files to .sqlite from the command line
Downloads
338
Maintainers
Readme
mdb-to-sqlite
Convert Microsoft Access .mdb files into SQLite databases with a single command.
mdb-to-sqlite is a lightweight CLI built for developers migrating legacy Access systems to modern stacks. It runs with pure Node.js and does not require Microsoft Access, ODBC drivers, or OS-level tools.
Quick Start
npx mdb-to-sqlite ./path/to/database.mdbThis creates ./path/to/database.sqlite in the same directory as the input file.
Why this tool
- Simple CLI workflow: run one command and get a
.sqlitefile - Cross-platform: works on macOS, Linux, and Windows (with Node.js)
- No system dependencies: no
mdb-tools, no Java, no Access installation - Migration-friendly output: clear progress and final conversion summary
Features
- Reads
.mdbfiles (Access 97-2003) - Exports all tables found in the source file
- Creates output
.sqlitein the same directory with the same base name - Converts common Access value types into SQLite-compatible values
- Returns explicit process exit codes for automation and CI pipelines
Installation
Run directly with npx (recommended)
npx mdb-to-sqlite ./path/to/database.mdbInstall globally
npm install -g mdb-to-sqlite
mdb-to-sqlite ./path/to/database.mdbInstall as a project dependency
npm install mdb-to-sqlite
npx mdb-to-sqlite ./path/to/database.mdbRequirements
- Node.js
>=16
Usage
npx mdb-to-sqlite <path-to-file.mdb>Example:
npx mdb-to-sqlite ./data/database.mdbOutput file:
- Input:
./data/database.mdb - Output:
./data/database.sqlite
Example CLI output
🚀 MDB → SQLite Converter
📥 Source → /path/to/database.mdb
📤 Output → /path/to/database.sqlite
📚 Tables found: 3
✓ "products" 25 rows • 11 columns
✓ "customers" 38 rows • 3 columns
✓ "orders" 14 rows • 9 columns
✅ Conversion completed successfully
Tables → 3 converted
Rows → 77
Size → 16.0 KB
File → /path/to/database.sqliteExit codes
0- Conversion completed successfully1- Invalid arguments, file not found, or unsupported extension2- Error while reading the.mdbfile3- Error while writing the.sqlitefile
Error messages
No argument:
Usage: mdb-to-sqlite <path-to-file.mdb>File not found:
Error: File not found: ./does-not-exist.mdbUnsupported extension:
Error: Only .mdb files are supported in the current version.Type handling
The converter normalizes common Access values for SQLite storage:
- Text/Memo ->
TEXT - Integer/Long Integer/Byte ->
INTEGER - Single/Double/Currency ->
REAL - Boolean ->
INTEGER(0/1) - Date/Time -> ISO-8601
TEXT null/undefined->NULL
Known limitations (v1.0)
.accdbis not supported- Table filtering is not available (all tables are exported)
- Custom output path is not available
- Access queries, forms, and macros are not migrated
- OLE/image embedded fields are not explicitly supported
Roadmap
Planned improvements for future versions:
.accdbsupport--output <path>option--tables <t1,t2>selection support--dry-runmode--verbosedetailed logs- Alternative exports (JSON/CSV)
Contributing
Contributions are welcome. If you want to help:
- Open an issue describing the problem or feature request
- Fork the repository and create a focused branch
- Add tests or reproduction steps when possible
- Open a pull request with a clear description of the change
License
MIT
