Data and JSON tools Free · No sign-up · No upload

SQL Results to JSON

Copy a result grid from your terminal or SQL client, paste it, and get JSON records. The layout is recognized for you. Your query output never leaves your browser.

  • No credit card
  • Never touches a server
  • MySQL, psql, SQL Server
  • NULL becomes null
Query results
  • Runs on your device. Files are never uploaded.
  • Free and unlimited. No sign-up, no watermark.
Private: processed in your browserNo upload waitIN: SQL out → OUT: JSON
How was SQL results to JSON?
How it works

SQL results to JSON in three steps

No account, no email, no waiting for an upload.

  1. STEP 01

    Paste the result grid

    Copy it from your terminal or client, including the header row.

  2. STEP 02

    Choose the options

    Decide whether numbers and true/false become real values, and whether empty cells become null.

  3. STEP 03

    Copy the JSON

    The note tells you which layout was recognized, such as MySQL table or psql table.

What you get

What SQL results to JSON does, and what it doesn't

We'd rather tell you up front than surprise you after the download.

What you get

  • Recognizes common layoutsMySQL and SQLite boxes with +---+ borders, psql tables, SQL Server text results and tab-separated grids are all understood.
  • Footers removedLines like '(3 rows)' or '3 rows in set' are ignored.
  • NULL handlingThe word NULL in MySQL, SQL Server or tab-separated output becomes a real JSON null.
  • Typed valuesNumbers and true/false can be converted from text, with leading-zero values kept as text.
  • Nested keysDotted column aliases can be rebuilt into nested objects.

Good to know

  • Text onlyIt reads copied output, not live database connections. Nothing connects to your database.
  • Values containing the border characterA cell with a pipe inside it can confuse a table layout. Use a CSV or tab-separated export for such data, then CSV to JSON.
  • psql shows empty for NULLpsql prints NULL as an empty cell by default, so use 'Empty cells become null' if that is what you want.
Private by design

Your data never leave your device

The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.

Typical online tool upload

Your device→Their server→Your device

Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.

Mediaextractr no upload

Your device does all the work

The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.

Made for real work

When people use SQL results to JSON

Turn a debugging query into fixtures

Paste what you saw in the terminal into a test.

Share results in a ticket

Convert output to JSON for an API example.

Move a result set to another tool

Skip exporting a file when a copy and paste will do.

Document a table

Create sample rows for a README.

Compare

Mediaextractr vs typical upload tools

MediaextractrPrivateTypical upload tools
Your file is uploadedNeverYes
Sign-up neededNoOften, after a few files
Daily file limitNoneOften 1–2 free files
WatermarkNeverSometimes
Wait for upload & downloadNoYes
Speed on very large filesDepends on your deviceDepends on their servers

Which layouts work

The tool looks at the first lines to decide how the grid is drawn. A line of plus and dash characters means a MySQL box. A dashed line with plus signs under the header means psql. A header followed by dashes aligned to columns means SQL Server's text output. Otherwise it reads tabs or commas.

The header names become the JSON keys. Repeated or empty names are made unique.

Tips for clean results

Output copied from terminals can include extras:

  • Remove prompts and the SQL itself, leaving only the grid.
  • Turn on typed values if you want numbers as numbers.
  • Turn off vertical or expanded output modes in your client, because only the usual grid layouts are read.
  • Need SQL going the other way? Use JSON to SQL INSERT.
  • Shape and share with the JSON formatter.

Copying results cleanly

In a terminal, select the whole grid including the border or header lines. In graphical clients, choose copy with headers and paste as text. If a client copies with extra quotes, switch the export to tab-separated. For psql, the default aligned format works well. Avoid the expanded display mode, which prints one value per line.

FAQ

Questions, answered

How do I convert MySQL output to JSON?

Paste the result grid, including its header, and copy the JSON.

Does it work with psql and SQL Server?

Yes. psql tables, SQL Server text results, MySQL boxes and tab-separated grids are recognized.

Is it okay to paste query output with real customer rows?

Yes. Parsing runs in your browser tab and nothing is uploaded, which is the reason to use it instead of a hosted converter.

How are NULL values written?

As JSON null, where the layout prints the word NULL.

Can numbers be typed?

Yes. 'Read numbers and true/false as values' is on by default.

Is it usable on a tablet?

Yes. Current mobile browsers run it, and the grid is pasted as plain text.