SQL to JSON Converter

SQL Tools

Turn INSERT statements or result tables into JSON records.

Runs entirely in your browser โ€” nothing is uploaded

What people do next

Features

  • Reads INSERT statements, or a pasted result grid.
  • Result grids can be pipe-, tab- or comma-delimited โ€” paste straight from a client.
  • Numbers, booleans and NULL are converted to their JSON equivalents rather than left as strings.
  • Multiple INSERT statements and multi-row VALUES lists are handled in one pass.
  • Converted in your browser โ€” production data is never uploaded.

How to use the SQL to JSON Converter

  1. 1Choose whether you are pasting INSERT statements or a result table.
  2. 2Paste the SQL or the grid.
  3. 3Copy the JSON, or download it.

Frequently asked questions

How are NULLs represented?

As JSON null, not as the string "NULL". The distinction matters when the JSON is loaded somewhere else โ€” a literal "NULL" string will pass a not-empty check and quietly corrupt the data.

Can I paste output straight from psql or MySQL?

Yes. Switch to result-table mode and paste the grid โ€” pipe-delimited output from psql, tab-delimited from a terminal client, or comma-delimited from an export all work. The first line is read as the header row, so include it.

What happens to dates and timestamps?

They come through as strings, because JSON has no date type. A value like '2026-08-29 14:30:00' stays a string in that form, which is what almost every consumer expects to parse.

Will it handle several INSERT statements at once?

Yes, and multi-row VALUES lists too. Every row found is added to the same array, so a seed file with a dozen statements against one table produces one JSON array.

Why is it not reading my INSERT?

The parser expects the column list in parentheses before VALUES โ€” that is, INSERT INTO users (id, email) VALUES (...). A statement without an explicit column list has no names to key the JSON on, so there is nothing to build an object from.