Free SQL Query Formatter

Format, beautify & minify SQL queries — clean output, readable code, faster debugging.

Samples:

Input SQL

Formatted Output

Formatted output will appear here…

A fast, clean SQL formatter for everyday work

Whether you’re debugging a production query, reviewing a pull request, or just trying to make a gnarly JOIN readable, this free SQL formatter helps you format and minify SQL instantly. Paste your query, choose a dialect, and get a consistent, easy-to-scan output you can confidently share with your team.

Readable formatting

Turn messy one-line queries into properly indented SQL with consistent clauses, commas, and CASE blocks.

Minify for embedding

Compress SQL into a compact single line—great for logging, URLs, or application configs.

Private by default

Your SQL stays in the browser session—copy, download, or clear it anytime with one click.

Built for real-world queries: JOINs, CTEs, window functions, and subqueries Shortcuts: Ctrl+Enter (format), Ctrl+M (minify), Ctrl+Shift+C (copy)