SQL formatter

Format an SQL query with readable line breaks and indentation, choosing the dialect (PostgreSQL, MySQL, SQLite, SQL Server, BigQuery…), the keyword case and the indentation, or minify it. Everything runs in your browser: your queries are not sent anywhere.

Your data stays on your computer. Files are processed in your browser and are never uploaded.

Drop an .sql file here, or type below.

What changes

Only line breaks, spaces and (if you want) the case of keywords, data types and functions. Strings, quoted names and comments stay as they were.

Minifying

It removes comments and extra whitespace but leaves strings, quoted identifiers, hints (/*+ … */) and MySQL conditional comments (/*! … */) alone. It never changes the meaning of the query.

Where your data goes

Everything happens on this page: the query is not stored, put in the address or sent. It is never run against any database.

Keyboard shortcuts

In this tool

This tool has no keyboard actions.

Everywhere

Open this panel (outside text fields)
?
Closes panels and menus, never clears data
Esc
Search for a tool
/ or CtrlK

Tool chains

Link several tools into a path: after using a tool, “Send to…” offers the next step first. Saved chains keep only a name and the tools, never your data.

Saved chains

No saved chains.

New chain