| Component | Description |
|---|
| Tables | Actual data |
| Queries | Saved SQL views |
| Forms | UI for entering data |
| Reports | Print-formatted output |
| Macros | Automation |
| VBA modules | Code |
For data migration, you mainly need the tables. Queries can be useful (preserved business logic). Forms, reports, macros, and code rarely transfer to modern systems.
| Tool | OS | Cost | Notes |
|---|
| Microsoft Access | Windows | Paid | Native, full-featured |
| Office 365 Access | Windows | Subscription | Same as desktop |
| LibreOffice Base | Cross-platform | Free | MDB read-only |
| MDB Tools | Linux/Mac | Free | Command-line MDB extraction |
| mdbtools-win | Windows | Free | Windows port of MDB Tools |
| Online conversion services | Web | Various | Privacy concerns |
For Windows users with Access: native export is best. For Mac/Linux or non-Access users: MDB Tools.
For native Windows Access:
- Open the MDB file in Access
- External Data tab > Text File
- Select "Export"
- Pick destination CSV file
- Choose comma delimiter and "First row contains column names"
- Click OK
For batch export of multiple tables: use the macro builder or VBA.
For each table individually:
- Tables list > right-click > Export
- Select format (CSV, Excel, XML, etc.)
Native Access also exports to Access ACCDB (the modern format), which has better tool support than MDB.
For non-Windows or non-Access workflows:
# Install on macOS
brew install mdbtools
# Install on Ubuntu
sudo apt install mdbtools
# List tables
mdb-tables database.mdb
# Export specific table to CSV
mdb-export database.mdb TableName > TableName.csv
# Export all tables
for table in $(mdb-tables -1 database.mdb); do
mdb-export database.mdb "$table" > "${table}.csv"
done
MDB Tools is the open-source standard. Reads MDB files reliably without Microsoft Access installed.
For batch processing, see Batch Processing Files Guide.
For LibreOffice users:
- LibreOffice Base > Open existing database
- Select MDB file
- Database opens in read-only mode
- Right-click table > Copy
- Paste into Calc or Writer
- Save as CSV
LibreOffice Base reads MDB but doesn't write it. For one-off export: works. For automation: command-line MDB Tools.
For migrating to a modern database, you need the schema (tables, columns, types):
# Get schema as SQL CREATE TABLE statements
mdb-schema database.mdb > schema.sql
# Get specific table schema
mdb-schema database.mdb -T TableName
The output is SQL DDL that can be modified for the target database (PostgreSQL, MySQL, SQLite). Manual review is recommended; some Access types don't translate exactly.
Access types and their CSV/SQL equivalents:
| Access type | CSV | PostgreSQL/MySQL |
|---|
| Text (255) | Text | VARCHAR(255) |
| Memo | Text | TEXT |
| Number (Long Integer) | Integer | INTEGER |
| Number (Double) | Number | DOUBLE PRECISION |
| Date/Time | Date string | TIMESTAMP |
| Currency | Number | DECIMAL(19,4) |
| Yes/No | TRUE/FALSE | BOOLEAN |
| OLE Object | Skip | BYTEA (BLOB) |
| Hyperlink | Text | TEXT |
| Attachment | Skip | (custom handling) |
For migration: simple types map cleanly. OLE Objects (embedded Excel sheets, images) are problematic. Plan for special handling.
Old MDB files often have encoding inconsistencies:
- Windows-1252 (common Western Europe legacy)
- UTF-8 (modern, less common in old MDB)
- Mixed (some fields one encoding, others another)
For MDB Tools:
# Specify input encoding
mdb-export -e CP1252 database.mdb TableName > TableName.csv
Convert to UTF-8 in post:
iconv -f CP1252 -t UTF-8 input.csv > output.csv
For batch:
for f in *.csv; do
iconv -f CP1252 -t UTF-8 "$f" > "utf8/${f}"
done
Common migration patterns:
MDB → SQLite:
# Extract schema
mdb-schema database.mdb sqlite > schema.sql
# Create SQLite database
sqlite3 newdb.sqlite < schema.sql
# Export and import each table
for table in $(mdb-tables -1 database.mdb); do
mdb-export -I sqlite database.mdb "$table" >> insert.sql
done
sqlite3 newdb.sqlite < insert.sql
MDB → PostgreSQL:
mdb-schema database.mdb postgres > schema.sql
psql -d newdb -f schema.sql
for table in $(mdb-tables -1 database.mdb); do
mdb-export -I postgres database.mdb "$table" > "${table}.sql"
psql -d newdb -f "${table}.sql"
done
MDB → CSV → SQL:
# Export to CSV
mdb-export database.mdb TableName > TableName.csv
# Import to PostgreSQL
psql -c "\copy TableName FROM 'TableName.csv' DELIMITER ',' CSV HEADER"
For tooling preferences: each option has trade-offs. Direct SQL is faster; CSV is more flexible.
File appears empty in MDB Tools: Access's Compact and Repair feature is needed. Try opening in Microsoft Access first to verify integrity.
Date columns export as numbers: Access dates are days since 1899-12-30. MDB Tools may export as serial number; convert in post-processing.
Memo fields truncated: some tools limit text length. MDB Tools handles long memos correctly.
Special characters mangled: encoding mismatch. Specify input encoding with -e flag.
Cannot open MDB with password: protection. Need the password. MDB Tools can't bypass passwords (encryption).
For broader CSV processing, see Batch Text Replacement in CSV.
Yes via Access (File > Save As > Access Database). ACCDB has better tool support and modern features.
For active business systems: migrate to modern database. For historical reference: archive MDB and CSV exports.
No native Access. Use Parallels/VMware to run Access on Windows. Or use MDB Tools to extract data without Access installed.
Yes via shell script. MDB Tools handles this well. For 100 MDB files: 30-60 minutes typical.
VBA macros can contain malware. Treat unfamiliar MDB files cautiously. Disable macros before opening (Trust Center > Disable all macros).
Microsoft hosts Access on Azure VMs. For new development: not recommended. For maintaining legacy systems: workable.
For Microsoft Access MDB export in 2026: Access (Windows) for full features, MDB Tools for cross-platform CLI. Export tables to CSV with explicit encoding. Migrate schema and data to modern database (SQLite, PostgreSQL, MySQL) for active workflows. Archive original MDB for historical reference. Our document converter handles related format conversions.