SwapSQL

PostgreSQL to MySQL converter

The direction most tools don't do — two ways to move your data.

Upload a dump file

Free

Export with pg_dump, upload the file, and get MySQL 8-ready SQL — uuid, jsonb, arrays and time zones mapped properly, output verified on a real MySQL server.

// 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 PostgreSQL source and MySQL 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 PostgreSQL database

pg_dump -h HOST -U USER -d DATABASE_NAME > dump.sql

# plain .sql, .sql.gz and custom-format .dump files are all accepted
gzip dump.sql

More options (Docker, remote servers, custom format) in the full pg_dump guide.

Step 2 — Convert it

Your dump is restored into an isolated PostgreSQL 16 sandbox, the schema is read directly from the live catalog (not parsed from text), translated to MySQL DDL, and the data is streamed out as efficient batched INSERTs.

Step 3 — Import into MySQL

mysql -u USER -p -e "CREATE DATABASE mydb CHARACTER SET utf8mb4"
mysql -u USER -p mydb < dump.mysql.sql

Careful type mapping

The full mapping table documents every type, including the lossy ones (interval, tsvector, ranges) — those are stored as text and flagged in your conversion report, never silently mangled.

// faq

Frequently asked questions

How do I convert a PostgreSQL database to MySQL?

Export with pg_dump (plain .sql or custom .dump format both work), upload it above, and download MySQL-ready SQL. Import with mysql yourdb < converted.sql.

What happens to uuid, jsonb and array columns?

uuid → CHAR(36) (with a (uuid()) default where you used gen_random_uuid()), json/jsonb → MySQL JSON, and arrays → JSON arrays that stay queryable with MySQL's JSON functions. Every mapping is listed in the conversion report.

How are timestamptz values handled?

MySQL DATETIME stores no time zone, so all timestamptz values are converted to UTC and stored as DATETIME(6) with microsecond precision. The report notes which columns were affected.

Is the output actually tested?

Yes — before you download it, the generated file is loaded into a real MySQL 8.0 server and the table and row counts are verified. You get a ✓ validated badge on success.

Do SERIAL / identity columns survive?

They become AUTO_INCREMENT columns, and the counter is set to continue from your highest existing id.

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 PostgreSQL source and MySQL target, and SwapSQL transfers the data directly — no dump file involved. The Pro plan removes the size and daily limits.