Category: Developer tools

SQL INSERT to CSV

System ideaMissing a tool?

Parse SQL INSERT statements into CSV rows

Parse one or more `INSERT INTO table (...) VALUES (...);` statements into CSV, supporting quoted strings, numbers and NULL. Statements that use functions, expressions or sub-selects are reported as unsupported rather than guessed at. Runs entirely in your browser.

SQL error: Unsupported value: true

CSV
The result will appear here.

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

Given a handful of INSERT statements copied out of a migration script or a support ticket, getting the data back into a spreadsheet usually means retyping it by hand. This tool reads the statement's column list (or invents col1, col2... when none is given), then walks each value tuple, understanding single- and double-quoted strings with escaped quotes, bare numbers, and the literal NULL. Anything it can't classify as one of those, such as a function call or an expression, stops the conversion with a message naming the offending value instead of silently emitting the wrong thing.

How to use it

  1. Paste one or more INSERT INTO ... VALUES statements, or load the example.
  2. Review the parsed row count and any error message.
  3. Copy the CSV result.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Is my SQL uploaded anywhere?
No. Parsing happens in JavaScript running in the page, so nothing you paste ever leaves your device.
What happens if the statement isn't supported?
A message names either the unsupported statement shape or the specific value it couldn't classify, such as a function call, instead of guessing at a result.
What if some statements don't list column names?
Column names default to col1, col2 and so on, based on how many values each row has; statements that do list columns are checked to make sure they all agree.