SQL Formatter
Format and beautify SQL queries. Multiple dialects, configurable indent, copy or download output.
Format and beautify SQL queries across PostgreSQL, MySQL, SQLite, BigQuery, MS SQL, and Standard dialects. Configurable indent size, uppercase-keywords toggle, and target line length.
When to use it
- 1Cleaning up a hand-written query before checking it into version control.
- 2Inspecting a complex generated query in a readable form.
- 3Reformatting a query in a dialect-specific way for clarity.
How it works
- 1
Paste your query
Left textarea. Output reformats live as you type.
- 2
Pick a dialect
Dialect-aware formatting matters for keyword recognition. Pick the one that matches your database.
- 3
Tune the style
Indent size, uppercase keywords, line length - tweak until it looks right.
Frequently asked
Does it run the query?
No - this is purely a text formatter. Connect a real database client for execution.
Want a tool just like this, but yours?
Every tool on this page was generated by GenMB from a single prompt. Describe yours and ship it to your own subdomain in minutes.
Build with GenMBRelated tools
Word & Character Counter
Count words, characters, sentences, paragraphs, and reading time. Save documents when signed in.
Text Case Converter
Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, kebab-case, and more.
Text Diff Checker
Compare two texts side-by-side with line and word diff. Save comparisons to revisit later.
JSON Formatter & Validator
Format, validate, and minify JSON with line-precise errors and a tree view. Save scratchpads when signed in.