SQL Formatter β Beautify SQL Queries Online
Format, beautify, and minify SQL queries instantly online. Supports SELECT, INSERT, UPDATE, DELETE, JOIN, subqueries and more. Clean indentation, keyword highlighting. Free SQL formatter.
About This Tool
Format and beautify SQL queries instantly in your browser. Paste messy, unformatted SQL and get clean, properly indented output with consistent keyword casing. Supports all major SQL clauses β SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, JOIN, WHERE, GROUP BY, ORDER BY, HAVING, and subqueries. Also includes a minify mode to compress SQL for production use or logging. Works with MySQL, PostgreSQL, SQLite, SQL Server, and most standard SQL dialects.
How It Works
Paste your raw or minified SQL query into the input box
Click Format to beautify the SQL with proper indentation and keyword casing
Use Minify to compress the SQL into a single line for production use
Copy the formatted output with one click