PixNudge

JSON to SQL Converter (and SQL to JSON)

Turn a JSON array into SQL INSERT statements with a matching CREATE TABLE, or read INSERT statements back into JSON. Works with MySQL, PostgreSQL, SQLite and SQL Server.

JSON
SQL

How it works

  1. 1

    Paste or open your data

    Paste text, drop a file onto the editor or click Open file. Load sample shows how the tool works.

  2. 2

    Adjust the options

    The result updates as you type. Change the options to get exactly the output you need.

  3. 3

    Copy or download

    Copy the result to the clipboard or download it as a file.

Why PixNudge

Nothing is uploaded

Your data is processed in your browser and never sent to a server, so API keys, tokens and customer data stay private.

Instant, even for large files

There is no round trip to a server: results appear as you type, and files of several megabytes are handled smoothly.

Exact numbers

Long numbers such as 64-bit IDs are kept exactly as written instead of being rounded.

Frequently asked questions

How are the column types chosen?

They are inferred from your data: whole numbers become INT or BIGINT, decimals become DOUBLE, true and false become BOOLEAN (or BIT or INTEGER where there is no boolean type) and text becomes VARCHAR sized to the longest value. Nested objects and arrays are stored as JSON.

How are quotes and special characters handled?

Strings are quoted and escaped for the database you choose, and table and column names are quoted with backticks, double quotes or square brackets, so names with spaces or reserved words work.

Can I convert SQL to JSON?

Yes. Switch the direction and paste INSERT statements, for example from a database dump. Every row becomes a JSON object; with more than one table, the rows are grouped by table name. Other statements are skipped.

More free tools