SQL Formatter
Formats SQL queries with consistent indentation, keyword casing and line breaks — for PostgreSQL, MySQL, SQLite, BigQuery, T-SQL and more — or compresses them to a single line. Formatting runs locally with the sql-formatter library.
Runs 100% in your browser — nothing you paste leaves your device.
Read the full guide to this tool
Notes
- Formatting is purely cosmetic: the query semantics are untouched, and string literals are never modified.
- Pick the dialect that matches your database so its specific keywords and operators are recognized.
- Runs 100% in your browser — nothing you paste leaves your device.