SQL Formatter Online
About this tool
Logged SQL is often one long line. Pick a dialect and format so keywords and clauses wrap before you read a plan.
Features
- Indents keywords by dialect
- MySQL, PostgreSQL, SQLite, MariaDB
- Runs locally; the statement is not uploaded
How to use
- Choose the dialect.
- Paste SQL.
- Copy the formatted query back to your editor.
When to use it
- A log line is one long SELECT
- Align JOINs before review
- Keyword casing differs across dumps
Examples
- select a from t where id=1 is broken into lines (casing follows settings).
- PostgreSQL ::jsonb is not rewritten as if it were MySQL.
FAQ
Does this run SQL?
No. It only formats text and never connects to a database.
Are stored procedures supported?
Typical queries and DDL work best. Vendor-specific procedure syntax may be imperfect.
Back to DevOps Tools Hub