Skip to content

SQL to JSON Converter

INSERT statements into JSON records — typed values, several tables, or NDJSON.

Drop a .sql dump here, or click to choose one

Converted on your device — the file is never uploaded

JSON

Quick Tool Overview

The SQL to JSON Converter turns INSERT statements into JSON records with their types intact: numbers stay numbers, NULL becomes null, and oversized integers are kept as strings so no digit changes.

What it does
Converts SQL INSERT rows to JSON
You give it
A .sql dump or INSERT statements
You get back
JSON records, keyed tables, or NDJSON
Best for
Seed data, fixtures and migrations
Converters Free, unlimited use No sign-up Runs in your browser

About the SQL to JSON Converter

Seed data, test fixtures and quick migrations all need the contents of a database as JSON, and the only copy you have is a dump full of INSERT statements. Writing a one-off parser for it is a classic waste of an hour.

Paste the dump and take JSON. Each row becomes an object keyed by its column names, numbers stay numbers, NULL becomes null, and integers too large for JavaScript to hold exactly — snowflake IDs, bigint keys — are kept as strings so not a digit changes. Several tables can be kept apart under their own keys, a single table exports as a plain array, and NDJSON writes one record per line for BigQuery, ClickHouse or a log pipeline. MySQL and PostgreSQL escaping are both understood, including pg_dump COPY blocks.

Key features of the SQL to JSON Converter

Types preserved

Numbers, NULL and quoted strings come through as the right JSON types.

Big integers safe

IDs beyond JavaScript’s exact range are kept as strings rather than rounded.

Several tables

Keep each table under its own key, or export just the one you need.

NDJSON output

One record per line for BigQuery, ClickHouse and log pipelines.

Boolean detection

Columns of nothing but 0 and 1 can become true and false.

How to use the SQL to JSON Converter

  1. 1

    Paste or drop the .sql file

    INSERT statements, a full mysqldump, or a pg_dump with COPY blocks.

  2. 2

    Choose the shape

    An array of rows, an object keyed by table name, or NDJSON.

  3. 3

    Set the value options

    Read 0 and 1 as booleans, or leave NULL columns out of each row.

  4. 4

    Copy or download the JSON

    Indented for reading, minified for code.

Frequently asked questions

JavaScript cannot hold an integer beyond about 9 quadrillion exactly. Anything larger is kept as a string so the value stays correct — silently rounding an ID would be worse.

Reviews of the SQL to JSON Converter

What people who use the SQL to JSON Converter think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the SQL to JSON Converter. It takes half a minute and no account.

Write the first review

More converters