Utilrix

SQL Formatter

Format SQL queries into clean, readable statements.

INPUT
OUTPUT

Processed 100% in your browser — nothing you enter here is ever uploaded.

Common use cases

Reviewing a query generated by an ORM

Format the raw SQL an ORM logged to confirm it's doing what you expect before it runs against production.

Reading a query from a slow query log

Turn a single-line query pulled from a slow query log into something you can actually reason about and optimize.

Cleaning up a query for a migration file

Format a one-line query before committing it to a migration so the next reviewer can follow the logic.

How to use the SQL Formatter

Pick the SQL dialect closest to your database — Standard SQL works for most simple queries.

Paste your query into the input panel.

Click Format to get properly indented SQL with uppercase keywords.

Frequently asked questions

Related tools