What is SQL formatting?

SQL formatting adds consistent line breaks, indentation, and keyword case so query structure is easier to review. It changes presentation, not database behavior.

SQL indentation and keyword capitalization

Choose two or four spaces and uppercase, lowercase, or preserved keyword spelling. Multiple semicolon-separated statements can be separated with one or two blank lines.

SQL dialect differences

Generic SQL, MySQL, PostgreSQL, SQLite, and SQL Server modes use the syntax support provided by the formatter library. Formatting cannot guarantee compatibility with every server version or extension.

SQL overview

The overview counts top-level semicolon-separated statements and common leading operations. Table names are shown only for straightforward FROM, JOIN, UPDATE, and INTO forms.

Frequently asked questions

Does this tool execute SQL?

No. It never connects to a database, resolves a schema, or evaluates a query.

Does successful formatting mean SQL is valid?

No. Formatting is not database semantic validation, and ambiguous input should still be tested against the intended database safely.