SQL Formatter

Beautify or minify SQL queries for easier reading. Free, no sign-up, your code stays on your device.

🔒 100% private — processing happens in your browser. Nothing is uploaded.

How to format SQL

  1. Paste the SQL query.
  2. Choose Format or Minify.
  3. Tick UPPERCASE keywords and choose the indent.
  4. Copy the result.

Readable queries

Queries from logs, ORMs and BI tools often come as one long line. Formatting puts each clause — SELECT, FROM, JOIN, WHERE, GROUP BY — on its own line with indentation, so you can review, debug and share it. Minify does the opposite for embedding in code.

Your SQL is formatted in the browser and never sent anywhere.

Questions and answers

Does it check the SQL for errors?

No, it formats the text; run the query in your database to test it.

Which dialects work?

Standard SQL plus common MySQL, PostgreSQL and SQL Server syntax.

Will it change my query?

Only spacing and keyword case.

Is it free?

Yes, no sign-up.