I write a lot of SQL every day. And every online formatter I tried had the same problems:
- Uploads queries to their server — privacy nightmare when you are working with production schema
- Tiny text area — cannot handle 500+ line queries without lag
- 3 ads before you even see the formatted output
So I built sqlformat.io — a no-BS SQL formatter.
What It Does
- Client-side only — everything runs in YOUR browser via Web Worker. Zero bytes leave your device
- 15+ SQL dialects — MySQL, PostgreSQL, SQLite, BigQuery, Snowflake, T-SQL, and more
- No signup, no ads, no upload — ever
- Instant — paste, click Format, done
Why I Built It
I got tired of copy-pasting production queries into random websites and wondering where they ended up. With sqlformat.io, you can disconnect your internet after the page loads and keep formatting offline.
Extra Tools Included
It is not just a formatter — the site has several free SQL tools:
- Diff — compare two SQL queries side by side
- Minify/Compress — strip whitespace for embedding in code
- Validate — syntax check across dialects
- ER Diagram — visualize table relationships
- SQL to JSON — convert query results
- Data Generator — generate test data
- Explain Visualizer — MySQL/PostgreSQL EXPLAIN output as a tree
Tech Stack
Vanilla JS + sql-formatter library, hosted on Cloudflare Pages. All formatting runs in a Web Worker so the UI stays responsive even on huge queries.
Open source: github.com/sharefun2023/sqlformat.io
Would love feedback from folks who format SQL daily!
Top comments (0)