SwapSQL

PostgreSQL → MySQL

Convert PostgreSQL jsonb to MySQL JSON

MySQL's JSON type stores documents in an optimized binary format, much like jsonb — so documents move across losslessly and stay queryable.

jsonb JSON

What to know

Before / after

PostgreSQL

SELECT settings->>'theme' FROM accounts;

MySQL

SELECT settings->>'$.theme' FROM accounts;
-- index: ALTER TABLE accounts ADD COLUMN theme VARCHAR(32)
--        GENERATED ALWAYS AS (settings->>'$.theme'), ADD KEY (theme);

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 PostgreSQL → MySQL converter

See the full type mapping table or all guides.