SwapSQL

MySQL → PostgreSQL

Convert MySQL JSON to PostgreSQL jsonb

Both engines store JSON natively, so data migrates cleanly. On the PostgreSQL side you almost always want jsonb — it's indexed, faster to query, and deduplicates keys.

JSON json / jsonb

What to know

Before / after

MySQL

SELECT JSON_EXTRACT(prefs, '$.theme') FROM users;

PostgreSQL

SELECT prefs->>'theme' FROM users;
-- after: ALTER TABLE users ALTER prefs TYPE jsonb USING prefs::jsonb;

Don't convert column-by-column — convert the whole database.

Upload a dump, get back ready-to-import SQL with this mapping (and every other one) applied.

Open the MySQL → PostgreSQL converter

See the full type mapping table or all guides.