Database dumps from mysqldump, pg_dump --inserts, SQLite .dump, phpMyAdmin or an ORM's seed file store rows as INSERT statements. Paste them here, pick an output and click Convert: every row becomes a JSON object, a CSV line, an XML <row> or a YAML item, grouped by table. The parser reads the SQL itself, so nothing is executed and no database is needed.
Direct links: SQL to JSON, SQL to CSV, SQL to XML, SQL to YAML.
INSERT INTO users (id, name, email, score) VALUES
(1, 'Ada Lovelace', 'ada@example.com', 9.5),
(2, 'O''Brien', NULL, 7);
INSERT INTO `orders` VALUES (10, 1, 'book');
converts to JSON keyed by table name:
{
"users": [
{ "id": 1, "name": "Ada Lovelace", "email": "ada@example.com", "score": 9.5 },
{ "id": 2, "name": "O'Brien", "email": null, "score": 7 }
],
"orders": [
{ "column1": 10, "column2": 1, "column3": "book" }
]
}
Notice the details the parser takes care of: the doubled quote in 'O''Brien' becomes one apostrophe, NULL becomes JSON null, numbers stay numbers, backtick-quoted names are unwrapped, and an INSERT without a column list gets column1, column2... When only one table is present, the output is a plain array of objects.
NULL. Several tables are separated by a # table line.<database> root, one element per table and one <row> per record; NULL becomes xsi:nil="true" so it stays distinct from an empty string.INSERT INTO table (cols) VALUES (...), (...); with any number of rows, INSERT IGNORE, identifiers quoted with backticks, double quotes or brackets, schema-qualified names (public.users is grouped as users), string escapes in both styles ('' and \'), negative and decimal numbers, TRUE/FALSE and NULL. Other statements in the dump (CREATE TABLE, SET, comments, LOCK TABLES) are skipped. INSERT ... SELECT is not supported because the rows only exist inside a database.
A query has no data until a database runs it. Export the result from your client as CSV and use the CSV converter, or ask the database for JSON directly, for example with json_agg in PostgreSQL or JSON_ARRAYAGG in MySQL.
The conversion runs in your browser's memory, so a few megabytes of INSERT statements work fine. For multi-gigabyte dumps, use a command-line tool.
No. The SQL is parsed in your browser and never sent anywhere.
Use the CSV converter: it generates a CREATE TABLE with inferred column types and one INSERT per row.