SQL formatter

Paste a query or a whole script: it is laid out clause by clause, with subqueries, CASE and procedure bodies indented. Fold blocks, comment them out and back in, add notes, and search.

Options

Presets are kept in this browser. Export them to share with your team.

Formatted

Paste SQL above and press Format: the result appears here, ready to fold, comment and search.

PrivacyTerms