Turn long one-line SQL queries into clean, readable statements.
Loading tool…
Paste a query, however long, and the formatter puts each clause (SELECT, FROM, WHERE, JOIN, ORDER BY) on its own line with consistent indentation. It uses the sql-formatter library, which understands each dialect's syntax, so text inside quotes such as 'in stock' is never changed. You choose the dialect, keyword case and indentation.
Make a one-line query from an ORM or a slow-query log readable.
Format SQL consistently so changes are easy to see.
Paste readable queries into docs, tickets and reports.
Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server (T-SQL), Oracle (PL/SQL) and BigQuery.
No. Only whitespace and, if you choose, the case of keywords change. Table names, column names and text inside quotes stay exactly as written.
Yes. Separate them with semicolons and each statement is formatted in turn.
Only enough to format it. To check syntax, use the SQL Validator.
No. Everything runs in your browser; nothing you paste or upload is sent to our servers.