SQL formatter
Paste SQL, pick a dialect, and get it indented and keyword-cased consistently.
Formatted SQL
SELECT o.id, o.customer_id, sum(oi.qty * oi.price) AS total FROM orders o JOIN order_items oi ON oi.order_id = o.id WHERE o.status = 'paid' GROUP BY o.id, o.customer_id ORDER BY total DESC;
Runs in your browser. Nothing you type is sent anywhere.
How this works
- Uses the sql-formatter library (MIT license), which understands each dialect's own keywords and syntax quirks. docs ↗
- Choose UPPER, lower or preserve for keyword case, and set the indent width.
- PartiQL isn't one of the supported dialects, so it's not offered here.
Do this against your live database in Tablyne.
PostgreSQL GUI →FAQ
Which dialects are supported? +
PostgreSQL, MySQL/MariaDB, SQLite, T-SQL (SQL Server), DuckDB, and Athena/Trino.
Does formatting change what my query does? +
No — only whitespace, line breaks and keyword casing change; the SQL itself is untouched.
Why isn't PartiQL an option? +
The formatting library this tool uses doesn't support PartiQL's syntax; DynamoDB's PartiQL statements are simple enough to format by hand.