Format and beautify SQL queries. Supports MySQL, PostgreSQL, SQLite, and more.
We support Standard SQL, MySQL, PostgreSQL, SQLite, SQL Server (T-SQL), PL/SQL, and MariaDB. Select your dialect from the dropdown for optimal formatting.
No. The formatter only changes whitespace, indentation, and keyword casing. Your query logic, table names, and values remain exactly the same.
Yes. Use the Minify button to compress your SQL into a single line by removing unnecessary whitespace and comments. This is useful for embedding SQL in application code.
Yes. Choose between UPPER (SELECT, FROM), lower (select, from), or Preserve (keep original casing) using the keyword case dropdown. UPPER is the most common SQL convention.
Yes. The formatter handles subqueries, CTEs (WITH clauses), JOINs, UNION, window functions, and other advanced SQL features. It properly indents nested structures for readability.