Code · Made a little simpler
SQL Formatter
Format SQL locally for SQLite, PostgreSQL, MySQL and other dialects. Set indentation and keyword case, inspect the output and download the formatted query.
Format a grouped query for your SQL dialect
Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
SQL Formatter: how to use it
- Choose the SQL dialect, indentation and keyword case.
- Paste a query or select a local UTF-8 file. Select Format SQL.
- Review the output and download formatted.sql. Check the quoted identifiers, string literals and binding placeholders.
Limits and notes
Accepts 250,000 UTF-16 code units and UTF-8 files up to 4 MiB. Layout follows SQL Formatter’s supported syntax. Formatting does not connect to a database or validate a schema.
How your privacy works →SQL Formatter: common questions
Why select a SQL dialect?
Dialects have different quotes, operators and placeholders. PostgreSQL dollar-quoted literals and MySQL backtick identifiers are interpreted using the chosen grammar.
Does formatting replace my bound parameters?
Placeholders recognized by the selected dialect remain in the output. The tool has no binding values or database connection.