SQL Formatter
Paste messy SQL, pick a dialect and formatting options, and get a clean, readable query. Runs entirely in your browser.
How to use:
- Paste your unformatted SQL query in the input box
- Select your target SQL dialect (PostgreSQL, MySQL, SQLite, SQL Server, BigQuery, Snowflake)
- Choose keyword case, indentation style, and comma position
- Formatting happens live as you type — or press Ctrl+Enter to format on demand
- Copy the formatted result with the copy button
Input 157 chars · 1 lines
Formatted
Formatted SQL will appear here.
About this tool
SQL Formatter is a free online tool that turns messy SQL into clean, consistently formatted queries. It supports seven SQL dialects and gives you control over keyword casing, indentation, and comma placement — all processed locally in your browser.
- Dialects
- Standard SQL, PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), BigQuery, Snowflake
- Options
- Keyword case (UPPERCASE / lowercase / preserve), indentation (2 spaces, 4 spaces, or tab), comma position
- Input
- Pasted SQL text
- Output
- Formatted SQL, ready to copy
- Signup
- Not required
- Processing
- Entirely in your browser via the open-source sql-formatter library — pasted SQL is never uploaded for processing
- Difference
- Unlike most online formatters, queries never leave your device — with 7 dialects including BigQuery and Snowflake
- Price
- Free
Limitations
- Formats and pretty-prints only — it does not validate syntax or fix semantic errors.
- It is not a linter and does not connect to any database.
SQL Formatter — FAQ
Is the SQL Formatter free?
Yes. The SQL Formatter is completely free with no signup and no usage limits, like all SqlInt mini tools.
Which SQL dialects does the formatter support?
Standard SQL, PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), BigQuery, and Snowflake — with keyword case, indentation, and comma-position options.
Does the formatter validate or fix my SQL?
No. It pretty-prints formatting only and does not fix syntax or semantic errors — use the SQL Linter to catch anti-patterns.
Does my data leave my browser?
No. Every mini tool processes data locally in your browser — pasted text and uploaded files never leave your device.
SQL Linter
Catch anti-patterns, implicit joins, and style issues in your SQL.
CSV to SQL
Turn CSV into CREATE TABLE + INSERTs with auto-detected types.
JSON ↔ SQL
Convert JSON arrays to SQL — and INSERTs back to JSON — live.
JOIN Visualizer
Visualize INNER, LEFT, RIGHT, FULL & CROSS joins across up to 3 chained tables.