SQL formatter

Format SQL dialects including MySQL and PostgreSQL, with indentation and keyword case options.

Local processing
Instructions and limits
  1. Enter or import SQL and choose its dialect, keyword case and indentation.
  2. Select Format or press Ctrl / Command + Enter, then copy or download the SQL.

Ten dialects. Input up to 200,000 characters, output 500,000, with a five-second timeout. Formatting does not execute SQL or validate database structure. Stored procedures and custom delimiters are unsupported.

Use cases and example

Make SQL copied from application logs, reports or source code easier to read, including joins, filters and grouping.

Choose MySQL and format a single-line SELECT with LEFT JOIN, then select indentation and keyword case to match your style.

Choose the actual database dialect. Formatting success does not prove a query executes or returns correct results. No database connection is made.