MentorMakers Login Sign up

Do More with MentorMakers

Free tools. Powerful features. Built for a smarter tomorrow.

  • 260 Free Tools
  • Most tools — no signup
  • Temporary files handled for processing
  • AI Assistant built in
  • Made in Pakistan
Explore All Tools

SQL Formatter

Paste a SQL query to make it readable, or minify it onto a single line.

What the formatter does

  • Starts each main clause on a new line: SELECT, FROM, JOIN, ON, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, UNION, INSERT, UPDATE, SET and VALUES.
  • Puts each selected column on its own line, and each AND / OR condition on its own line.
  • Indents subqueries inside brackets, so nested SELECTs are easy to follow.
  • Writes keywords in UPPERCASE (optional) and adds spaces around operators.

Strings ('Lahore'), quoted identifiers ("Order", `table`, [column]) and comments are kept exactly as written, so the query works the same after formatting. Minify removes comments and extra spaces, which is useful for logs or embedding SQL in code.

Supported dialects

The formatter understands the common syntax of MySQL, MariaDB, PostgreSQL, SQLite and SQL Server. Very dialect-specific code, such as stored procedures or PL/SQL blocks, is tidied but may not be laid out perfectly. Your query is formatted in your browser and is never sent anywhere, so it is safe for production queries.

Free to useNo software to install — works in any modern browser.
No signup neededOpen the tool and start straight away.
Your file stays on your deviceEverything happens in your browser — nothing is uploaded.
Works on mobileSame tool on your phone, tablet or desktop.

Prefer to just describe the task? The AI Assistant can convert, compress and resize files from a short instruction.

Rate this tool

Log in to leave a review.

Processing your file…
Large files, OCR and video can take a minute or two — please keep this page open.
Bookmark this page
Press Ctrl+D for quick access next time