SQL Formatter

Use SQL Formatter, review the result, and keep the original until the output is checked.

Input SQL
SQL Editor
Formatted SQL
Formatted Output
Click "Format" to see formatted SQL here...
100% browser-side processing — your data is never uploaded to any server. · Per-tool input limit: 1 MB
100% browser-based No upload to server Free to use

Frequently Asked Questions About SQL Formatter

Which SQL dialects are supported?

The formatter targets common ANSI-style syntax and is used for MySQL, PostgreSQL, SQL Server and SQLite statements. Dialect-only constructs may be re-spaced without being interpreted.

Will it change the meaning of my query?

Reformatted output keeps keywords, identifiers and literals; only whitespace, casing and line breaks change. Still, review string literals that intentionally contain newlines.