(🇪🇸 Abrir la versión en español aquí)
🔒 100% CLIENT-SIDE IN YOUR BROWSER: zero HTTP requests, zero query logging. Quick examples:
Why You Should Never Paste Production SQL Into Server-Side Formatters
Most ad-supported online SQL formatters transmit your query to a remote backend via HTTP POST—leaking confidential table schemas, customer emails embedded in debug filters, internal microservice boundaries, or billing logic into third-party logs. This utility runs a complete lexical tokenizer locally in browser RAM, preserving string literals, quoted identifiers ("col" / `col`), and -- or /* ... */ comments with zero network payloads.
In addition to indentation and single-line minification, the built-in linter applies checks aligned with PostgreSQL SQL lexical syntax, SQLite language grammar, and the OWASP SQL Injection Prevention Cheat Sheet.
SQL Anti-Patterns Flagged Before Production Execution
| Flagged SQL Pattern | Production / P99 Latency Impact | Recommended Fix |
|---|---|---|
UPDATE / DELETE missing WHERE |
Instantly overwrites or wipes 100% of rows in the table. | Wrap in BEGIN; ... ROLLBACK; and verify row counts prior to COMMIT. |
SELECT * FROM ... |
Defeats covering indexes (Index-Only Scans) and bloats I/O. | Explicitly list only columns required by the endpoint or report. |
LIKE '%term' |
Forces a full Sequential Scan regardless of B-Tree indexes. | Switch to anchored prefix filters ('term%') or trigram/GIN indexes. |
ORDER BY without LIMIT |
Spills sort buffers to temp disk on large datasets. | Use keyset cursor pagination (WHERE id > ? LIMIT 50). |
Frequently Asked Questions
Are my SQL queries or table schemas ever sent to a server?
Never. Tokenization, formatting, minification, and anti-pattern linting run 100% in JavaScript inside your browser tab. You can turn off Wi-Fi after loading the page and keep formatting safely offline.
Which SQL dialects does this formatter support?
The tokenizer handles ANSI SQL, PostgreSQL, MySQL/MariaDB (preserving backticks), SQLite, and SQL Server (T-SQL), cleanly ignoring comments and string literals while formatting keywords.
What security and performance checks run automatically?
It flags missing WHERE clauses on UPDATE/DELETE, SELECT * usage, leading wildcard LIKE '%...' scans, destructive DDL (DROP/TRUNCATE), unpaged ORDER BY sorts, and SQL injection tautology patterns.
Engineering Disclaimer: Static SQL formatting and heuristic linting only; always verify execution cost on live tables with EXPLAIN ANALYZE inside your database engine.