SQL formatter

Paste a query to get clean, consistently indented SQL that’s easy to read, review and share.

Sealed on this device

Runs in your browser. Nothing is uploaded.

Sealed

Formatted SQL

Keywords

Your formatted SQL will appear here as you type.

How it works

  1. Paste your query

    Paste one query or a whole script, or open a .sql file. Several statements separated by semicolons are fine.

  2. Pick your dialect and style

    Choose your database so its specific syntax is understood, then set keyword case, indentation and layout.

  3. Copy the clean SQL

    The formatted query updates as you type. Copy it or download it as a .sql file.

Frequently asked questions

Are my queries sent to a server?

No. Formatting runs in your browser, so table names, customer data in literals and internal schemas never leave your device.

Why does the dialect matter?

Each database has its own keywords, quoting rules and operators: backticks in MySQL, square brackets in SQL Server, :: casts in PostgreSQL. Picking the right dialect lets the formatter recognise them instead of reporting an error.

Does formatting change what my query does?

No. Only whitespace, line breaks and, if you choose, the case of keywords change. Table names, column names, strings and comments are kept exactly as written.

Does it check that my SQL is correct?

It reads the structure of the query, so unclosed quotes and parentheses are reported with their line and column. It doesn’t connect to a database, so it can’t tell whether a table or column exists.

What is the aligned columns layout?

It lines up the keywords in a fixed-width column on the left, with the rest of each clause aligned next to them. Some teams find long SELECT lists easier to scan that way.

Install One For All on your computer

One For All then opens in its own window, like an app, straight from your desktop or home screen. Nothing to download from a store, and your files still stay on your device.

  1. Click the install icon at the right of the address bar, or open the browser menu (⋮).
  2. Choose “Install One For All” or “Install page as app”: a shortcut is added to your desktop and your apps.

Download this tool’s engine?

This tool works entirely in your browser. To do that, it needs to download the items below from One For All, just once. They are then kept on this device, so next time the tool starts right away.

Your files are never sent anywhere.