SQL Formatter
Format and beautify SQL queries client-side with support for popular dialects. Your queries never leave the browser.
Paste SQL and click Format. Queries are beautified locally with support for popular dialects.
What this SQL formatter does
Format and beautify SQL queries with support for MySQL, PostgreSQL, SQLite, SQL Server, BigQuery, Snowflake and other dialects. Formatting happens in your browser, so your queries — including any embedded data — never leave the page.
How it works
SELECT, FROM, WHERE and JOINstart on new lines, and subqueries are indented. Choose uppercase or lowercase keywords to match your house style.ON DUPLICATE KEY.Frequently asked questions
How do I format SQL?
Paste your SQL into the input pane and click Format. The query is beautified with consistent indentation and keyword casing.
Which SQL dialects are supported?
Popular dialects including MySQL, PostgreSQL, SQLite, and SQL Server.
Does formatting upload my query?
No. Formatting runs entirely in your browser, so your queries never leave the page.
Does SQL Formatter upload my data?
No. SQL Formatter runs entirely in your browser — your input never leaves this page.
Is SQL Formatter free to use?
Yes. SQL Formatter is completely free, with no account and nothing to sign up for.