Pretty-print · highlight · minify
🗄️ SQL Formatter
Paste messy SQL and get it pretty-printed with clauses on their own lines, indented subqueries, AND/OR alignment and syntax highlighting, or minify it back to one line.
Works with MySQL, PostgreSQL and SQL Server flavors. Strings, quoted identifiers and comments (-- and /* */) are preserved untouched. Keyword casing only affects keywords, never your identifiers.