crud.md
// crud.md / sql-formatter

Turn a 2KB one-liner into SQL you can actually read.

Paste the minified query your ORM dumped into a log and get it back indented, with major clauses on their own lines and keywords cased consistently. String literals and comments are preserved exactly — and it all happens in your browser, so the query is never uploaded.

sql-formatter · v1.0 local-only

FAQ

Is my data sent anywhere?+

No. Your query is tokenized and reformatted entirely in your browser — it is never sent to a server. We count anonymous, aggregate usage on our own server (a page view, that a query was formatted) — never your SQL, your table names, or any literal in it.

Will it ever change what my query does?+

No. The formatter only moves whitespace and (optionally) cases keywords. It is deliberately conservative: string literals ('…'), quoted identifiers ("…") and comments (-- and /* … */) are treated as opaque and reproduced byte-for-byte, commas inside a string are never split, and when it isn't sure it preserves spacing rather than guess. It's a reindenter, not a query rewriter.

Which SQL dialect does it understand?+

It's dialect-agnostic. Rather than parse a full grammar (Postgres vs MySQL vs T-SQL all differ), it re-indents a token stream over the common shape of SELECT / INSERT / UPDATE / DELETE / DDL — clauses on new lines, subqueries indented, operators single-spaced. That keeps it safe on almost anything you paste. Dialect-aware formatting, style profiles and a minify-vs-pretty toggle are on the roadmap; this one is free.