SQL
Format and minify queries, and move rows between INSERT statements and JSON, CSV, XML, YAML and HTML.
SQL Formatter & Beautifier
This SQL formatter breaks a one-line query into readable clauses, across a dozen dialects.
SQL Minifier
This SQL minifier strips comments and whitespace to give you a one-line query.
SQL to JSON Converter
This SQL to JSON converter reads INSERT statements and gives you an array of typed records.
SQL to CSV Converter
This SQL to CSV converter turns INSERT statements into spreadsheet rows, escapes and all.
SQL to XML Converter
This SQL to XML converter turns each inserted row into an element with a child per column.
SQL to YAML Converter
This SQL to YAML converter turns inserted rows into a list of mappings, ready for fixtures.
SQL to HTML Table Converter
This SQL to HTML converter renders inserted rows as a proper table you can publish.
CSV to SQL Converter
This CSV to SQL converter turns spreadsheet rows into escaped INSERT statements.
JSON to SQL Converter
This JSON to SQL converter turns an array of objects into escaped INSERT statements.
About SQL
SQL turns up in two quite different shapes, and this category covers both. The first is SQL as text: a query pasted out of a log or an ORM dump, run together on one line with no indentation, that you need to read before you can reason about it. The formatter breaks it into clauses, indents subqueries and normalises spacing across a dozen dialects, and the minifier does the reverse when a query has to fit into a config file or an environment variable. The second is SQL as data: a dump full of INSERT statements holding rows you actually want somewhere else. Those statements are parsed properly rather than pattern-matched, so a comma inside a string, an escaped apostrophe or a function call in a value cannot corrupt the result, and the rows come out as JSON, CSV, XML, YAML or an HTML table with their types intact. The same bridge works in reverse: paste a spreadsheet export or an API response and get INSERT statements back, correctly escaped and optionally with a CREATE TABLE inferred from your data.
Everything on this page runs directly in your browser — none of your input is uploaded, and every tool keeps working when you are offline.