Skip to content
Convert mdb to sql

Free online MDB to SQL converter

Convert legacy Access MDB data into an SQL script for database migration or archival.

Convert MDB to SQL online - free

Uploading…

Your file is processed instantly and deleted as soon as you download it.

How it works

  1. 1/3

    Upload your .mdb file

    Click to browse to select your file you want to convert or simply drag & drop your file into selected area.

  2. 2/3

    Perform .mdb to .sql conversion

    After successful file upload, click to convert when you are ready.

  3. 3/3

    Download converted .sql file

    Conversion result is ready to download.

How to convert mdb to sql file

Legacy Microsoft Access applications often need their data moved to MySQL, PostgreSQL, SQLite, SQL Server, or another database that accepts an SQL script. Converting the file produces text containing table definitions and data statements that can be imported, reviewed, shared, or archived.

What the MDB format is

MDB is the primary Microsoft Access database format used through Access 2003 and also supported by some later Access versions. An MDB file can contain tables, indexes, relationships, saved queries, forms, reports, macros, and VBA code, using the Jet or ACE database engine.

MDB files remain common in legacy Access applications, office databases, inventory systems, accounting software, and older Windows programs. Microsoft Access can open and edit them. LibreOffice Base may open them through suitable database drivers, while MDB Tools provides command-line access on systems without Microsoft Access.

What the SQL format is

An .sql file is a text script rather than a single database-engine format. It can contain statements such as CREATE TABLE, ALTER TABLE, INSERT, index definitions, and constraints.

SQL dialects differ between MySQL, PostgreSQL, SQLite, SQL Server, and Oracle. Data types, identifier quoting, Boolean values, auto-increment columns, date literals, and administrative commands are not interchangeable. Select the target database before exporting, because a MySQL script may require editing before it runs on PostgreSQL or SQL Server.

How to convert MDB to SQL

For a no-installation conversion, use the MDB-to-SQL converter on 101convert.com, upload the MDB file, choose the SQL output, and download the generated script. Confirm which SQL dialect the converter produces. Open the result as text and test it against an empty database before importing production data.

For local command-line conversion, MDB Tools can export schema and table data without Microsoft Access:

  1. Copy the original MDB file so the source remains unchanged.
  2. List its tables with mdb-tables -1 database.mdb.
  3. Generate a target-specific schema, for example mdb-schema database.mdb mysql > schema.sql. Use a backend supported by the installed MDB Tools version, such as mysql or postgres.
  4. Export each table as SQL inserts, for example mdb-export -I mysql database.mdb Customers > Customers.sql. Repeat this for every table listed in the previous step.
  5. Run the schema before the data, then add or recreate indexes and foreign keys. Loading referenced tables first, or adding foreign keys after loading, avoids dependency errors.
  6. Import the combined script into an empty test database and compare row counts, keys, dates, and representative text and numeric values with the MDB source.

The -I option requests INSERT statements in the selected backend syntax. Run mdb-export --help and mdb-schema --help because supported backend names and options vary between MDB Tools releases. MDB Tools usually exports tables and basic definitions; it does not reproduce the complete Access application.

For large or difficult migrations, connect the MDB file through Microsoft Access or an MDB-compatible ODBC driver, load the data into the destination database, and use that database's native dump utility, such as mysqldump for MySQL or pg_dump for PostgreSQL. This workflow requires the destination server and appropriate drivers but provides better control over target-specific types and constraints.

Compatibility and data-quality checks

An SQL table script normally preserves table data and some schema, but it does not preserve Access forms, reports, macros, VBA modules, interface settings, or application logic. Saved Access queries may need to be rewritten because query syntax and functions differ between engines.

Review AutoNumber fields, which may become identity columns or sequences; Yes/No fields, which may become Boolean or integer columns; and Attachment, OLE Object, multivalue, calculated, and hyperlink fields, which may require separate extraction or redesign. Binary attachments and OLE content are not reliably represented by ordinary INSERT statements.

Check primary keys, indexes, relationships, null handling, Unicode text, dates, decimal values, reserved words, and identifier quoting after import. Access names that are valid in MDB may conflict with reserved words or naming rules in the destination engine.

Encrypted, password-protected, corrupted, or unusually complex MDB files may not export correctly with MDB Tools. If authorized, open the file in Microsoft Access, use Database Tools → Compact and Repair Database, remove protection, and repeat the export. Keep the original file and verify the converted database before deleting or archiving the source.

MDB vs SQL: format comparison

How the MDB and SQL formats compare on the properties that matter most for this conversion.

Comparison of the MDB and SQL file formats
Property .MDB Microsoft Access Database .SQL Structured Query Language script
Plain-text readable No Yes
Data types Typed Typed
Nested structures Yes —
Formulas No No
Multiple tables or sheets Yes —
Typical file size Medium Small
Open standard No Partly open
Best used for Data exchange Data exchange
Introduced 1992 1970
Developer Microsoft —
MIME type — application/sql

Information about file extensions and file types is provided by File-Extensions.org

Frequently asked questions

Is the MDB to SQL converter free?

Yes, converting MDB to SQL on 101convert.com is completely free. No registration, email address or installation is required. If you need a higher file size limit or want to convert more files at once, see our plans.

How large can my MDB file be?

You can upload MDB files up to 50 MB and convert up to 20 files at once in a single batch.

What happens to my uploaded files?

Files are processed automatically and deleted from our servers within a few minutes after conversion. We never view or share your files.

Do I need to install any software to convert MDB to SQL?

No. The MDB to SQL conversion runs entirely online in your browser and works on Windows, Mac, Linux, Android and iPhone.

Did the conversion fail?

In most cases, the cause is an incorrect file format. Please upload a valid MDB file for this MDB to SQL conversion. Occasionally, the issue may be on our side. We analyze recurring conversion failures and disable or fix the converter if we detect a defect.

Already downloaded

This file has already been downloaded. For your privacy it was deleted from our server right after the download, so it cannot be downloaded again. To get it once more, convert the file again.