Neatly Done

SQL Formatter

Format and beautify SQL online. Choose your dialect, indent and keyword case. Long queries become easy to read, and your SQL stays in your browser.

  • Free
  • No sign-up
  • Works on phone and computer

How to format SQL

  1. Paste your SQL.
  2. Choose the dialect, indent and keyword case.
  3. Copy the formatted query or download it.

About this tool

Turn a one-line query into something you can read. Pick the dialect, such as MySQL, PostgreSQL, SQL Server, Oracle or BigQuery, so dialect-specific syntax is understood. Choose the indent and whether keywords are upper or lower case. Your SQL is formatted in the browser and never sent to a server.

Common questions

Why does the dialect matter?

Each database has its own syntax, for example how it quotes names. Picking the right one avoids parse errors and keeps those parts intact.

Does it change what the query does?

No. Only spaces, line breaks and keyword case change.

Can it format several statements?

Yes. Statements separated by semicolons are formatted one after another.

Is it free to use?

Yes. There's no sign-up, and you can use it as often as you like.

Is my text uploaded anywhere?

No. This tool runs inside your browser, so what you enter stays on your device.

Do I need to install anything?

No. It works in your browser on a computer or a phone.