SQLSQL Formatter
Loading...
SQL queries often vary in style between authors, and auto-generated queries can be hard to read. The SQL Formatter formats SQL queries into a consistent style for better readability. It supports 13+ SQL dialects including MySQL, PostgreSQL, Oracle (PL/SQL), and SQL Server (T-SQL), with configurable indentation and keyword casing.
How to Use
- 1Enter SQL
Paste the SQL query you want to format in the left input area.
- 2Configure Options
Select the SQL dialect, indentation (2 spaces/4 spaces/tab), and keyword case (UPPER/lower/preserve).
- 3Review Results
View the formatted SQL in the right panel and use the copy button to copy it to your clipboard.
Tips
- 💡Setting keywords to UPPER makes SELECT, FROM, WHERE, etc. stand out for better readability.
- 💡Complex queries with subqueries and JOINs are automatically indented for clarity.
- 💡Select the dialect matching your database for accurate formatting of dialect-specific syntax.
- 💡All processing happens in your browser, so sensitive queries are never sent to a server.