About sqlfmt
Prettier for SQL, plus a spell-checker.
sqlfmt cleans up and checks your SQL in the browser. Paste a query, pick a dialect, and get readable, consistent SQL back — with syntax errors and misspelled keywords flagged inline. No setup, no extension, no copy-pasting into a desktop tool.
Format
Clean, consistent SQL on your terms — keyword case, indentation, comma style, and line width. Built on a battle-tested formatter, tuned per dialect.
Validate
Real per-dialect parsing, not regex guesswork. Syntax errors point at the exact line and column so you fix the cause, not a vague failure.
Suggest
A spell-checker for SQL. SELCT → SELECT, COUTN( → COUNT(. Misspelled keywords surface inline, before your database ever sees the query.
Five dialects, one tool
Formatting and validation are dialect-aware, so the rules match the database you actually ship to.
- PostgreSQL
- MySQL
- SQLite
- SQL Server (T-SQL)
- BigQuery
Your SQL stays yours
Formatting and validation run entirely in your browser. Your queries are never sent to a server unless you choose to save a snippet to your account. Free to use, no account required.
See the Privacy Policy for details.
Built by Sharon Ben-Moshe
sqlfmt was built out of daily frustration with SQL tooling that either reformats code inconsistently, misses dialect-specific syntax, or leaks your queries to third-party servers. I wanted something that runs entirely in the browser, works with the dialects I actually use, and catches the typos that slip past every linter I've tried.
The formatting engine is built on sql-formatter, validation uses node-sql-parser, and the typo-checking is a custom position-aware keyword checker using optimal-string-alignment distance to rank suggestions — so COUTN correctly surfaces COUNT over COTN.
Ready to clean up some SQL?
Start formatting for free, or go Pro for unlimited use and live formatting.