SQL Formatter transforms minified or messy SQL into readable, indented queries. Keywords go on new lines (SELECT, FROM, WHERE, JOIN, ON, AND, OR), SELECT lists split one column per line, and multi-word keywords (GROUP BY, INNER JOIN, IS NOT NULL) are recognized. Optional UPPERCASE keyword normalization and syntax highlighting for keywords, functions, strings, and numbers.
Reading SQL copied from code or logs is often painful — ORMs produce single-line queries, log formatters strip newlines, and hand-written SQL from different authors uses inconsistent indentation. SQL Formatter gives you a clean, consistent view of any query in one click. The formatter tokenizes the SQL (handling strings, comments, numbers, identifiers, operators, and punctuation), recognizes ~80 SQL keywords including multi-word ones like GROUP BY, LEFT OUTER JOIN, IS NOT NULL, and ORDER BY. Top-level keywords (SELECT, FROM, WHERE, HAVING, etc.) each go on their own line. SELECT lists get one column per line, making wide column lists readable. JOIN clauses indent on a new line with their ON condition. Optional UPPERCASE normalization converts mixed-case keywords to uppercase for consistency. Syntax highlighting colors keywords purple, functions blue, strings green, numbers orange, and comments italic gray. Comments (-- line and /* block */) are preserved. A Minify option compacts a query back to a single line for one-liner use (e.g., as a string in code).
Tokenizer recognizes ~80 SQL keywords (including multi-word GROUP BY, INNER JOIN, IS NOT NULL) for correct line breaking.
Each column in a SELECT list gets its own line — wide column lists become scannable.
Optional uppercase conversion for keywords gives your query consistent casing regardless of author.
Keywords, functions, strings, numbers, and comments are color-coded for easy structure scanning.
SQL comments (-- and /* */) are preserved in place during formatting — no surprise deletions.
Collapses any formatted query back to a single line — useful when embedding SQL as a string literal in code.
ORMs like Sequelize, Prisma, or TypeORM log single-line SQL. Paste into the formatter to understand the query structure.
When reviewing a PR with embedded SQL strings, format them for readability before leaving comments.
Format a slow query to see its JOIN structure clearly, making bottlenecks easier to spot during optimization.
Produce cleanly formatted SQL for inclusion in README, internal wikis, or API documentation.
New SQL developers can paste their queries and see proper formatting as a learning reference for idiomatic style.
Click the SQL icon in the DevSuite Pro dock. A panel opens with options and an input area.
Paste any SQL — from ORM logs, a file, or a code editor. Works with SELECT, INSERT, UPDATE, DELETE, CREATE, and more.
Press Format to get an indented, readable query with keywords on their own lines.
Adjust indent width, toggle UPPERCASE keywords, enable/disable syntax highlighting to match your style.
Click Copy to grab the formatted or minified query. Paste into your IDE, ticket, or documentation.
Installieren Sie DevSuite Pro kostenlos und schalten Sie 39+ Entwickler-Tools für Ihren Browser frei.