Utill.net

SQL Formatter

Beautify Queries

Format SQL queries for Standard SQL, MySQL, PostgreSQL, SQLite, BigQuery, MariaDB, PL/SQL, and T-SQL.

What is this tool?

This SQL formatter beautifies queries for Standard SQL, MySQL, PostgreSQL, MariaDB, SQLite, BigQuery, PL/SQL, and T-SQL. It restructures whitespace, line breaks, indentation, and keyword casing to make queries easier to read.

Formatting does not replace database validation. Dialects differ in functions, quoting, operators, procedural blocks, and vendor-specific syntax, so formatted output should still be reviewed before execution.

Use it to inspect generated ORM queries, clean up copied logs, prepare reviewable SQL in pull requests, and make complex joins or filters easier to reason about.

How to use

  1. Paste a SQL query into the input area.
  2. Select the SQL dialect that best matches your database.
  3. Choose the indentation width.
  4. Click Format, review the result, and copy the formatted query.

Examples

Input / settingOutputNotes
select id, name from users where active = 1 order by created_at descSELECT\n id,\n name\nFROM\n users\nWHERE\n active = 1\nORDER BY\n created_at DESCStandard SQL formatting with uppercase keywords.
select count(*) from orders group by statusSELECT\n count(*)\nFROM\n orders\nGROUP BY\n statusAggregation query split across clauses.

Related tools & concepts

Last reviewed: 2026-05-08