What is SQL Formatting?
SQL formatting adds consistent indentation, line breaks, and keyword casing to SQL queries, making them far easier to read and debug. Production SQL is often minified or auto-generated as a single dense line — a formatter restores the structure instantly.
How to Use This Tool
- Paste your SQL into the left panel
- Select your SQL dialect (MySQL, PostgreSQL, etc.)
- Choose keyword casing: UPPER, lower, or preserve
- The query is formatted automatically as you type
- Click Minify to compress back to a single line
- Click Copy to copy the result to your clipboard
Features
- Multi-dialect — MySQL, PostgreSQL, SQLite, T-SQL, BigQuery, Standard SQL
- Keyword casing — UPPER, lower, or preserve original case
- Minify — compress SQL to a single line for embedding
- Syntax highlighting — color-coded output via Monaco editor
- Browser-based — your SQL never leaves your device
FAQ
Which SQL dialects are supported?
MySQL, PostgreSQL, SQLite, T-SQL (SQL Server), BigQuery, and Standard SQL.
What is the difference between formatting and minifying SQL?
Formatting adds indentation and line breaks to make SQL readable for humans. Minifying removes all unnecessary whitespace to create a compact single-line query, useful for embedding in code or logs.
Can I change how keywords are cased?
Yes. Choose between UPPER case (SELECT, FROM, WHERE), lower case, or preserve original casing.
Is my SQL data safe?
Yes. All SQL formatting runs entirely in your browser. Your queries are never sent to any server.