SQL Formatter

Beautify complex SQL, CTEs, and PostgreSQL queries correctly.

Input Query
Formatted SQL will appear here...

Supported Features

This formatter is designed for modern, complex queries:

  • CTEs (WITH clauses): Properly formats `WITH ... AS (...)`.
  • Parameters: Preserves `:param`, `@param`, and `$1` syntax without breaking.
  • Postgres Operators: Supports `||` concatenation and `::` type casting.
  • Log Cleanup: Automatically converts literal `\n` and `\t` from logs into readable SQL.