3 tools in this category

SQL Tools

Lay out, check and generate SQL text without connecting to a database.

SQL usually arrives in the worst possible shape: a query copied out of a slow-query log, an ORM's debug output, a one-line string in application code, or a colleague's paste in chat. These tools work on the text of the query only. Nothing is executed and no database is involved, so a query against production tables is as safe to paste as a toy example, and nothing you paste leaves the browser.

Use the SQL Formatter to lay a query out with one clause per line and indented subqueries, or to minify it to a single line for a string in code. It reads the quoting rules of MySQL, PostgreSQL, SQL Server, SQLite and BigQuery, and it points to the line and column of an unclosed quote, a missing bracket or a stray comma before FROM. To load a spreadsheet into a table, export it as CSV and use CSV to SQL: it writes a CREATE TABLE with a type for each column and INSERT statements with every quote escaped the way your database reads it, then hands the result to the formatter if you want to read it. Data that comes from an API or a log is usually JSON: JSON to SQL does the same for an array of objects, and either keeps nested objects as JSON columns or flattens them into columns of their own. If what you have is a column of IDs from a spreadsheet that has to become a WHERE id IN (…) list, that is a job for the SQL IN preset of Column to Comma Separated List, which also doubles any single quote inside a value.

Tools in this category

SQL Formatter

Lay out SQL with one clause per line and indented subqueries, or minify it to one line. Points out unclosed quotes and stray commas.

CSV to SQL Converter

Turn CSV rows into INSERT statements and a CREATE TABLE with detected column types, with quotes escaped the way your database expects.

JSON to SQL Converter

Turn a JSON array of objects into INSERT statements and a CREATE TABLE, keeping nested objects as JSON or flattening them into columns.