SQLFormatter
FormatterConvertPricingDocsGet Pro
Beautifier · MySQL

Beautify MySQL SQL online

Beautify minified, single-line MySQL SQL into clean, readable, properly indented queries. Turn crushed output from logs, ORMs or dbt into something you can read, diff and review.

1Paste your MySQL query into the editor.
2Press Format — or ⌘↵.
3Copy clean, highlighted SQL.
Open formatter
before
SELECT o.id,o.total,c.name FROM orders o JOIN customers c ON c.id=o.customer_id JOIN order_items i ON i.order_id=o.id WHERE o.created_at>'2026-01-01' AND o.status IN('paid','shipped') GROUP BY o.id ORDER BY o.total DESC LIMIT 100;
MySQL
SELECT
  o.id,
  o.total,
  c.name
FROM
  orders o
  JOIN customers c ON c.id = o.customer_id
  JOIN order_items i ON i.order_id = o.id
WHERE
  o.created_at > '2026-01-01'
  AND o.status IN ('paid', 'shipped')
GROUP BY
  o.id
ORDER BY
  o.total DESC
LIMIT
  100;

Why beautify MySQL?

MySQL queries with three or four joins are common — and brutal to read when they arrive minified from slow-query logs. Beautifying breaks each JOIN and ON condition onto its own line, so you can trace how the tables connect at a glance.

Once the joins are laid out vertically it's obvious where a query is doing too much work — the first step before reaching for EXPLAIN.

All SQL formatters & beautifiers

Format PostgreSQLBeautify PostgreSQL
Format MySQLBeautify MySQL
Format T-SQLBeautify T-SQL
Format SQLiteBeautify SQLite
Format BigQueryBeautify BigQuery
Format OracleBeautify Oracle
Format SnowflakeBeautify Snowflake
Format RedshiftBeautify Redshift