SQL Formatter
Format and indent SQL queries for readability.
SQL Input
Formatted SQL
About the SQL Formatter
Format SQL with grammar-aware rules for MySQL, PostgreSQL, SQLite, SQL Server, Oracle PL/SQL, BigQuery, Snowflake, Redshift, Spark SQL, DuckDB, and more. Choose indentation and keyword casing, then copy or download the result.
Examples
Format SELECT
select id,name from users where active=1Output
SELECT id,
name
FROM users
WHERE active=1Keyboard shortcuts
- Copy the main outputCtrl / ⌘ + Shift + C
- Download the resultCtrl / ⌘ + S
- Share this toolCtrl / ⌘ + Shift + S
- Reset the inputsAlt + R
- Open the tool search paletteCtrl / ⌘ + K
Related tools
SQL Playground & Query Runner
Dev Utilities
Write schema and seed SQL, then run queries against an in-memory database.
SQL Query Analyzer
Dev Utilities
Find expensive SQL patterns, missing filters and index opportunities.
SQLite Database Viewer & Query Runner
Dev Utilities
Open a .sqlite/.db file in your browser and run SQL against it.
Code Minifier & Beautifier
Dev Utilities
Minify or beautify JavaScript, CSS, HTML, JSON, XML, SQL, Java, Kotlin, C#, C/C++, Go, Swift, PHP, Python and YAML.
.editorconfig Generator
Dev Utilities
Create an .editorconfig file with per-language overrides.
.htaccess Redirect Generator
Dev Utilities
Generate Apache .htaccess redirect and rewrite rules.
Frequently asked questions
Read more
- Debugging slow SQL queries: an index primer
Reading EXPLAIN output, understanding why an index gets ignored, and the indexing patterns that fix most slow queries.
- A SQL playground that runs in your tab: CSV import, schema explorer and exportable results
Practise SQL, prototype a query or analyse a CSV without installing a database. How SQLite-in-WebAssembly makes a private, zero-setup playground possible.
Comments
No login needed. Comments appear after a quick review.
Loading comments…
Version 2.0.0 · Updated 2026-09-16 · Runs entirely in your browser