VS Code
SQL Format Desk
SQL Format Desk formats SQL in VS Code, then re-tokenizes the result and compares it with the original. If a single token would change, nothing is applied. Dialect detection covers T-SQL, PostgreSQL, PL/SQL, MySQL, BigQuery, SQLite, and a generic fallback. The extension is offline and has no telemetry.
Price and where to get it
Free. Pro is planned and not for sale yet.
What it does
- Format document, format selection, and format on save.
- Auto-detects the dialect. The status bar shows it, and you can override it.
- Preview diff before apply. Indent, keyword case, and leading or trailing commas are configurable.
- Pro is planned, and not for sale yet: procedure and function body formatting, a shared .sqlformat.json, SQL inside JS, Python, or PHP strings, and lint hints.
- Formatting is built on sql-formatter (MIT).