Beautify and format SQL queries with proper indentation. Supports MySQL, PostgreSQL, SQLite, T-SQL, BigQuery & more.
This tool uses the open-source sql-formatter library (v15) to parse and pretty-print SQL statements. It handles SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, CTEs, sub-queries, and more.
Choose the dialect matching your database engine for best results — each dialect has its own keyword set and quoting style. The Uppercase keywords option normalises select → SELECT across the output.
All formatting is performed client-side in your browser. No SQL is sent to any server.