SwapSQL

MySQL to PostgreSQL converter

Two ways to move your data — upload a dump file or connect your servers directly.

Upload a dump file

Free

Export with mysqldump, upload the .sql file, and download PostgreSQL-ready SQL. Powered by a real engine — AUTO_INCREMENT, ENUMs, zero dates all handled.

// converter

uploads deleted on completion real engine, not regex free account, e-mail only

Live server-to-server

Free up to 5 MB

No dump file needed. Connect your MySQL source and PostgreSQL target directly — SwapSQL reads from one and writes to the other.

  • Enter connection details for both databases
  • Test connections before starting
  • Tables, data, indexes and keys transferred directly
  • Full report when the migration completes
  • Save connections for repeat migrations
Open live migration

Compare plans — or start free, upgrade when you need it.

Step 1 — Export your MySQL database

mysqldump --single-transaction --no-tablespaces \
  -h HOST -u USER -p DATABASE_NAME > dump.sql

# optional but recommended (≈10× smaller upload):
gzip dump.sql

Need more detail (Docker, phpMyAdmin, remote servers)? See the full mysqldump guide.

Step 2 — Convert it

Drop dump.sql (or dump.sql.gz) into the box above. The dump is loaded into an isolated MySQL 8.0 sandbox, migrated to PostgreSQL 16 table-by-table, and exported with pg_dump — so the file you download is guaranteed-valid PostgreSQL.

Step 3 — Import into PostgreSQL

createdb mydb
psql -d mydb -f dump.postgresql.sql

What converts automatically

Views and stored routines are engine-specific, so they are listed in the conversion report for manual porting instead of being converted half-right.

// faq

Frequently asked questions

How do I convert a MySQL database to PostgreSQL?

Export your database with mysqldump, upload the .sql file above, and download the converted PostgreSQL dump. Import it with psql -d yourdb -f converted.sql.

Does it convert AUTO_INCREMENT columns?

Yes. AUTO_INCREMENT columns become PostgreSQL sequences (or identity defaults) and the counters are reset to continue from your highest existing id.

What happens to ENUM columns?

Real PostgreSQL ENUM types are created with the same labels, so your data and constraints survive intact.

What about zero dates like 0000-00-00?

PostgreSQL rejects MySQL's zero dates, so they are converted to NULL — the standard, safe mapping. Any affected rows are counted in the conversion report.

Are foreign keys and indexes preserved?

Yes — primary keys, foreign keys (with ON DELETE/ON UPDATE actions), unique constraints and indexes are all recreated on the PostgreSQL side.

Can I migrate without creating a dump file?

Yes — live migration is included on the free plan for source databases up to 5 MB (two per day). You enter the connection details for both your MySQL source and PostgreSQL target, and SwapSQL transfers the data directly — no dump file involved. The Pro plan removes the size and daily limits.