🗄️SQL Formatter

Paste messy SQL and get clean, properly indented queries — free, instant, and runs entirely in your browser.

Keywords
Indent
Input
Output
Formatted SQL will appear here…

Free SQL formatter online — beautify queries instantly

Working with a wall of unformatted SQL is hard to read and easy to misjudge. This free SQL formatter takes any query — SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, joins, subqueries — and reformats it into clean, consistently indented SQL with one clause per line and aligned conditions. Paste it in and the formatted version appears instantly, no setup required.

Choose UPPERCASE or lowercase keywords, pick a 2-space, 4-space, or tab indent, and switch to minify mode when you need a compact single-line query instead. Works with MySQL, PostgreSQL, SQLite, SQL Server, and other ANSI-SQL dialects. Everything runs in your browser — nothing is uploaded or stored, so it's safe to paste real queries and schema. No sign-up, no downloads, no limits.