Home โ€บ Developer Tools โ€บ SQL Formatter

๐Ÿ—„๏ธ SQL Formatter

Beautify messy SQL with uppercase keywords and clean line breaks, or minify it to one line.

About this SQL Formatter

One-line SQL copied from logs or application code is painful to read and debug. This formatter uppercases the keywords, puts each major clause (FROM, WHERE, JOIN, GROUP BY, ORDER BY) on its own line and indents list items and conditions, turning a wall of text into a query you can actually follow. The minify button does the opposite when you need a query compact for embedding.

How to use it

  1. Paste your SQL into the box.
  2. Click Beautify SQL for the readable layout, or Minify for one line.
  3. Read the result in the box below.
  4. Copy it back into your editor, console or query tool.

Example

'select id, name from users where age > 18 order by name' becomes a SELECT list, then FROM, WHERE and ORDER BY each starting on their own line with keywords in capitals.

Frequently asked questions

Does it understand my database dialect?

It handles standard SQL shared by MySQL, PostgreSQL, SQLite and SQL Server. Vendor-specific syntax is left as-is rather than rewritten.

Is my query uploaded anywhere?

No โ€” formatting happens entirely in your browser, so private schemas and data in your queries stay on your device.

More Developer Tools