Esta página aún no está traducida al español, así que la mostramos en inglés.

SQL to JSON, CSV & Excel Converter

Paste a SQL dump or a few INSERT statements and get the rows back as JSON, CSV or an Excel workbook with one sheet per table.

Actualizado el
Output
Open .sql file
Backslash escapes (\' \n)

Table preview

Tus datos nunca salen de tu ordenador. Todo se procesa localmente en tu navegador.

Cómo usar: SQL to JSON, CSV & Excel

  1. Paste INSERT statements or open a .sql dump file (mysqldump, pg_dump --inserts, SQLite .dump, phpMyAdmin export).
  2. Pick the output: JSON, CSV or Excel. With several tables, choose one from the table menu.
  3. Column names come from the INSERT column list or the matching CREATE TABLE statement.
  4. Copy the result or download it — the Excel download contains one sheet per table.

What is SQL to JSON / CSV conversion?

Database exports are often SQL scripts: a CREATE TABLE followed by thousands of INSERT INTO … VALUES (…) rows. That is great for restoring a database but awkward when you just want to look at the data, hand it to a colleague in Excel or load it into a script. This tool parses the INSERT statements and gives you the rows as JSON objects, a CSV file or an .xlsx workbook — without installing or restoring a database.

What it understands

  • Multi-row inserts: VALUES (…), (…), (…) as written by mysqldump and most export tools.
  • Column names from the INSERT column list, or — when the INSERT has none — from the matching CREATE TABLE in the same script.
  • Quoted identifiers: `backticks`, "double quotes" and [brackets], plus schema-qualified names like public.users.
  • String escapes: doubled quotes ('O''Brien') everywhere, and MySQL backslash escapes ('O\'Brien', \n) — detected automatically or set manually.
  • Literals: numbers, NULL, TRUE/FALSE, N'…' Unicode strings, X'…' hex and MySQL charset introducers such as _utf8mb4'…'.
  • Comments (--, #, /* … */) and other statements (SET, LOCK TABLES, ALTER) are skipped.

Expressions such as NOW() or CAST(…) cannot be evaluated without a database, so they are kept as text and counted in a notice.

Choosing an output format

FormatBest for
JSONAPIs, fixtures, JavaScript and Python scripts. With several tables, “All tables” returns an object keyed by table name.
CSVImporting into another database, data tools or Google Sheets. The download includes a UTF-8 BOM so Excel shows accents correctly.
ExcelSharing with non-developers: one worksheet per table, bold frozen header, numbers stored as numbers.

Limits

INSERT … SELECT statements have no literal values and are skipped, as are Oracle INSERT ALL blocks. PostgreSQL COPY … FROM stdin sections are not INSERTs — export with pg_dump --inserts or --column-inserts instead. Going the other way? Use CSV & Excel to SQL or JSON to SQL.

También se busca como: sql to json, sql to csv, sql to excel, sql dump to csv, mysqldump to json, insert statements to csv, sql to xlsx, convert sql file to excel.

Herramientas que combinan con: SQL to JSON, CSV & Excel

  • SQL Formatter — Paste a query — or a whole migration — and get readable SQL with one clause per line, aligned joins and consistent keyword case, using the grammar of your database.
  • JSON to Excel — Turn a JSON array into a real Excel workbook.
  • JSON to CSV — Turn a JSON array into a spreadsheet-ready CSV.
  • Excel to JSON — Open an .xlsx workbook or paste cells straight from Excel or Google Sheets and get clean JSON.

Preguntas frecuentes

How do I convert a .sql file to Excel?
Open the .sql file with Open .sql file, choose Excel as the output and click Download .xlsx. Each table in the dump becomes its own worksheet.
Why are my columns named column1, column2…?
The INSERT statements have no column list and the script does not include the CREATE TABLE for that table. Add the CREATE TABLE statement (or a column list) and the real names are used.
Does it work with PostgreSQL dumps?
Yes, if the dump was created with pg_dump --inserts or --column-inserts. The default COPY format is not made of INSERT statements.
Is my SQL dump uploaded?
No. The file is read and parsed in your browser, so customer data in the dump stays on your device.
How big can the dump be?
There is no fixed limit, but very large dumps (hundreds of MB) may be slow in a browser tab. Split them by table if needed.
¿Puedo instalar SQL to JSON, CSV & Excel como aplicación web y utilizarla sin conexión?
Sí. SQL to JSON, CSV & Excel es una aplicación web instalable (PWA): se instala desde el navegador, no se descarga desde una tienda de aplicaciones. Haz clic en «Instalar aplicación» en la parte superior de esta página en Chrome o Edge (Windows, macOS, Linux, ChromeOS) o, en Android, utiliza «Compartir» → «Añadir a la pantalla de inicio» en iPhone y iPad, o «Archivo» → «Añadir al Dock» en Safari 17+ en un Mac. A continuación, se abrirá en su propia ventana con su propio icono y, como se ejecuta íntegramente en tu navegador, seguirá funcionando sin conexión. Firefox en el ordenador de sobremesa no permite instalar aplicaciones web. Cómo funciona la instalación.

Herramientas relacionadas