Useful Hacks

SQL Formatter

Format and indent SQL queries for readability.

Processed locally in your browser. Nothing you enter is uploaded or stored.
  • Clause-aware indentation — SELECT, FROM, JOIN, WHERE and GROUP BY line up.
  • Consistent keyword casing, your choice of upper or lower.
  • Runs in your browser; queries aren't uploaded.

Why this is private

  • Processed locally in your browser. Nothing you enter is uploaded or stored.
  • Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
  • Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.

Overview

Reformats a single-line or inconsistently indented SQL query into a readable, consistently indented statement.

How to use it

  1. 1Paste a SQL query.
  2. 2Choose keyword casing (UPPERCASE or lowercase).
  3. 3The formatted query appears instantly.

Tips

  • Formatting is keyword- and clause-aware but dialect-agnostic — review complex vendor-specific syntax (e.g. T-SQL hints) before running the result.

Frequently asked questions

What people use it for

Read a query pulled from application logsBreak a one-line ORM-generated statement into readable clauses.
Review a complex query before running itIndentation makes a missing join condition or misplaced filter obvious.
Standardise SQL in a migration or PRFormat everyone's queries the same way before committing.
Prepare a query for documentationA clean, cased statement to paste into a runbook or wiki.

Related guides

Related tools

All developer tools

Ready to use SQL Formatter?

SQL Formatter

Search tools

Search for any tool by name, category or keyword