🗄️ SQL Formatter
Beautify or minify SQL queries with proper indentation. Supports SELECT / INSERT / UPDATE / DELETE / JOIN / WITH.
✅ 100% free, no signup, runs entirely in your browser
🔗 Related Tools
📖 How to Use
-
1
Set action and optionsChoose beautify or minify, then set indent size and keyword casing (UPPERCASE, lowercase, or preserve).
-
2
Enter your SQLPaste your SQL query into the left input. Click Sample to load a complex example with SELECT, JOIN, and subqueries.
-
3
Copy the resultThe formatted or minified SQL appears on the right. Click Copy to copy it to your clipboard.
❓ FAQ
Which SQL dialects are supported?
Standard SQL with SELECT, INSERT, UPDATE, DELETE, WITH, and JOIN is supported. Dialect-specific syntax like stored procedures is partially supported.
Are comments preserved?
In beautify mode, comments (-- and /* */) are preserved. In minify mode, comments are removed.
Are string literals modified?
No. String literal contents (values in single quotes) are not affected by keyword casing or whitespace changes.