Free
SQL Formatter
Format, beautify and minify SQL queries with dialect-aware syntax highlighting for MySQL, PostgreSQL, SQLite, SQL Server and Oracle.
expand_more
tablePaste or type SQL here, or upload a .sql file
About SQL Formatter
Paste any SQL query and instantly beautify it into clean, readable, properly-indented code. Supports five major dialects — MySQL, PostgreSQL, SQLite, SQL Server (T-SQL) and Oracle (PL/SQL) — with auto-detect to identify the most likely dialect from your query. Toggle keywords between UPPERCASE and lowercase, choose 2-space, 4-space, or tab indentation, and switch between inline and expanded clause positioning. Minify compresses your query to a single line for embedding or logging. All processing is 100% client-side — your SQL never leaves the browser.