Formatters

SQL Formatter

Format SQL queries for readability

Input
1:00 Bytes
Output
1:00 Bytes

Features

Beautify SQL

Reformats inline or minified SQL into readable, keyword-aligned queries

Keyword Casing

Normalises SQL keywords (SELECT, FROM, WHERE) to consistent uppercase

Switch Input / Output

Swap editor contents with a single click

Copy & Download

Copy the formatted query or download as a .sql file

Readable SQL is maintainable SQL

ORMs generate SQL that works but reads terribly. Log outputs, query builders, and analytics tools often produce queries on a single line with inconsistent casing. When you need to understand what a query is actually doing — or explain it to a colleague — formatting it properly makes a significant difference. Keywords stand out, the join chain becomes obvious, and the WHERE clause is no longer buried.

How to use it

Paste your SQL into the input editor and click Beautify. The formatter aligns keywords, wraps clauses onto separate lines, and normalises casing to uppercase for reserved words like SELECT, FROM, JOIN, and WHERE. If you want to go in the other direction — say you've been editing a formatted query and want to flatten it — hit Switch to move the output back to the input and reformat.