All tools · 📐 Format / Inspect
📐 SQL Formatter
Paste any SQL query — we format with proper indentation, uppercase keywords (SELECT, FROM, WHERE), and aligned column lists. Handles SELECT, INSERT, UPDATE, DELETE, CTE, JOINs.
Loading tool…
Examples
Messy one-liner
Input
select id,name from users where active=1 order by idOutput
SELECT id, name
FROM users
WHERE active = 1
ORDER BY id;JOIN query
Input
select u.name,count(o.id) from users u left join orders o on o.user_id=u.id group by u.nameOutput
Formatted with each clause on its own line, joined columns indented.Frequently asked questions
Which SQL dialect is supported?
Generic ANSI SQL. Dialect-specific syntax (Postgres LATERAL, MySQL backticks, T-SQL TOP) may not format optimally but won't break.
Why uppercase keywords?
Convention since the 70s — improves scannability. Some teams prefer lowercase ("modern" style); both are valid.
Will it preserve my comments?
Single-line (-- comment) and block (/* */) comments are preserved as-is.
About this tool
SQL Formatter runs entirely in your browser using standard Web APIs. No data is sent to any server. The source for this tool is in our public GitHub repository.
Related tools
- 📐 JSON Formatter — Format, validate, and minify JSON with syntax error highlighting.
- 🗜️ HTML / CSS / JS Minifier — Strip whitespace, comments, and shrink HTML, CSS, or JavaScript.
- 🔍 Text Diff Checker — Compare two pieces of text line by line. See additions, removals, and changes.
Why this tool
vs typical free web-tool sites
| 1vw | Typical free site | |
|---|---|---|
| Price | Free | Free |
| Signup required | No | Often (for premium features) |
| Ads inside the tool | No | Yes (banner + video) |
| Data sent to server | No (browser-only) | Yes (inputs analyzed for ads) |
| Total tools | 96 | Often <20 or scattered across sites |
| Bookmarkable URL per tool | Yes | Mixed |
| Loads in under 1s | Yes (static) | Often slow (ad tracking) |
| Multilingual | EN / ES / PT / FR / DE | Usually EN only |
| Open source | Yes | No |