SQL Formatter

Format and indent SQL queries for readability.

Support
Works Offline
Privacy First
No Login
No API

This is a heuristic formatter for common SQL clauses (SELECT, JOIN, WHERE, GROUP BY, etc.) — it does not parse a full SQL grammar, so unusual dialect syntax may not format perfectly.

SQL Input

Formatted SQL

About the SQL Formatter

Paste minified or messy SQL and get it reformatted with keywords on new lines and consistent indentation, making SELECT, JOIN, WHERE, and GROUP BY clauses easy to scan.

Examples

Format SELECT

select id,name from users where active=1

Output

SELECT id,
  name
FROM users
WHERE active=1

Keyboard shortcuts

  • Copy the main outputCtrl / ⌘ + Shift + C
  • Download the resultCtrl / ⌘ + S
  • Share this toolCtrl / ⌘ + Shift + S
  • Reset the inputsAlt + R
  • Open the tool search paletteCtrl / ⌘ + K

Related tools

Frequently asked questions

Read more

Comments

No login needed. Comments appear after a quick review.

Protected by an on-site captcha — no third-party trackers.

Optional: get an alert when your comment is published or replied to, plus new tool announcements. No sign-up.

Loading comments…

Version 1.0.0 · Updated 2026-08-07 · Runs entirely in your browser