Code Tools
Popular
Recently added
SQL Formatter
Beautify SQL queries with keyword casing and readable line breaks.
Introduction
Pretty-print SQL so long queries are easier to read and share during debugging. Format locally, then paste back into your SQL client.
Features
- Uppercase SQL keywords
- Line breaks for major clauses
- Comma wrapping for readability
- One-click copy
How to use
- 1Paste your SQL into the input panel.
- 2Review the formatted output.
- 3Copy when ready.
Example
Select query
Inputselect id, name from users where active = 1Output
SELECT id, name FROM users WHERE active = 1
Benefits
- Use SQL Formatter without installing a desktop app or browser extension.
- Works well alongside JSON Formatter and JSON to CSV for adjacent steps in the same workflow.
- Results stay in this browser tab until you copy or download them.
FAQs
No. It focuses on formatting and keyword casing, not full SQL parsing.
Common keywords are handled. Exotic dialect syntax may need manual tweaks.
No. Formatting runs locally.
Pair SQL Formatter with JSON Formatter, JSON to CSV, Find & Replace. See Related tools on this page.