Developer & Data tool

SQL Formatter

Break long SQL into readable clauses and column lists while preserving quoted values and comments.

Formatting does not execute SQL or validate its syntax, tables, or columns.

1 lines

Keep the content and tidy the whitespace

  1. Paste the source SQL

    Check that quotes and block comments are closed. Unclosed content produces an error.

  2. Compare the formatted query

    Look for clearer SELECT columns and FROM or WHERE clauses. Keyword capitalization stays as you entered it.

  3. Review before execution

    Check syntax and the real database schema before running the copied SQL. Successful formatting is not evidence that a production query is safe.

Format a short query

Start with
select id,name from users where active = 1;
Check the result
id and name move onto separate lines, and from and where start new lines. Lowercase keywords remain lowercase.

This is whitespace formatting. It does not check whether users or active exists.