SQL Formatter
Format SQL for common dialects or compact whitespace outside strings and comments.
How to use the SQL Formatter
Format SQL for common dialects or compact whitespace outside strings and comments.
Steps
- Paste a SQL statement into the input area.
- Choose the SQL dialect, then select Format or Minify.
- Review and copy the result before using it in a database client.
Example: A simple query
SELECT id, name FROM users WHERE active = 1;Limitations
Formatting changes whitespace and layout, not query meaning or safety. It does not validate a query against a database or protect against SQL injection.