T-51 · Developer tools
Format SQL queries for PostgreSQL, MySQL, SQL Server, SQLite, BigQuery, Snowflake, Oracle and more. Choose keyword case and indentation.
About this instrument
Paste a query, even one long line, to lay it out with one clause per line and indented column lists, joins and subqueries. Pick your SQL dialect so its quoting, operators and keywords are recognised, choose whether keywords are upper case, lower case or kept as typed, and set the indent width or use tabs. Formatting uses the open-source sql-formatter library and runs in your browser.
FAQ
No. Only whitespace and, if you choose it, the case of keywords are changed. Identifiers, strings and values are left as written.
Yes. Statements separated by semicolons are formatted one after another, with a blank line between them.
No. The formatter library is loaded into this page and runs locally, so queries containing table names or data stay on your device.
Related instruments