SQL Formatter
Format and beautify SQL queries with dialect support: MySQL, PostgreSQL, SQLite, BigQuery, T-SQL. Also minifies SQL. Runs in your browser — no upload.
📋 How to use SQL Formatter
- 1Paste your SQL query (minified or messy) into the input box
- 2Choose the SQL dialect: MySQL, PostgreSQL, SQLite, BigQuery, or T-SQL
- 3Adjust indentation and keyword case options
- 4Click Format SQL and copy the result
Try it now
Examples
Format a SELECT query
Frequently Asked Questions
Is my SQL uploaded?▾
No. Formatting runs in your browser using the sql-formatter library. Your queries never leave your device.
Which dialects are supported?▾
Standard SQL, MySQL, PostgreSQL, SQLite, BigQuery (Google), and T-SQL (Microsoft SQL Server).
Can I minify SQL?▾
Yes — click Minify to remove all whitespace and comments for embedding in code or environment variables.
Related Tools
JSON Formatter
Format, validate, and minify JSON with one click. Supports syntax highlighting.
Text Diff Checker
Compare two texts side-by-side and highlight every difference line by line. Split and unified views. Copy unified diff. Runs entirely in your browser — no uploads.
Regex Tester
Test regular expressions against strings with live match highlighting.