SQL Formatter
Make SQL easier to read. Choose the dialect used by your database.
How to use it
- Paste your input, or load the example.
- Choose the options that match your task.
- Select Format SQL, then review the result.
- Copy the result or download sql-formatter.sql.
Formatting, not query validation
Formatting adjusts whitespace and keyword case without running SQL or connecting to a database. Choose your dialect before formatting quoted identifiers, placeholders or dialect-specific statements. The formatter supports common queries, not every stored procedure or vendor extension. A formatted query can still contain semantic errors.