SQL Formatter
Format, beautify, minify, remove comments, and copy SQL queries instantly in your browser.
How to use SQL Formatter / Minifier
Paste SQL
Add your SQL query or statement into the input box.
Format query
Use Format SQL to beautify your query with proper indentation.
Minify SQL
Use Minify SQL to compress the query into a single line.
Remove comments
Strip SQL comments before using the query in production.
FAQ
Frequently asked questions
Which SQL dialects are supported?
MySQL, PostgreSQL, SQL Server, SQLite, and standard ANSI SQL are supported.
Can I customize indentation?
Yes, choose tab or space indentation and control keyword casing.
Is the SQL formatter free?
Yes, completely free with unlimited formatting.
Can I minify SQL as well as format it?
Yes, switch between readable formatting and compact minified output.
Is my SQL uploaded anywhere?
No, all formatting runs locally in your browser so your queries stay private.
