Code and data

SQL Formatter

Format and beautify SQL queries online.

  • Free
  • Runs in your browser: nothing is sent
  • API: 120 runs a minute without an account
  • No sign-up

Tryselect u.id, u.name from us…select * from users where a…

About SQL Formatter

Turn a long single-line query into properly indented SQL with keywords aligned, so joins and nested conditions are readable in a code review or a bug report.

  • Readable indentation for joins, subqueries and CTEs
  • Uppercase keyword mode for a consistent house style
  • Compact mode to put a query back on one line
Questions · 2

Which SQL dialects are supported?

The formatter works on standard SQL syntax, which covers the vast majority of PostgreSQL, MySQL, SQLite and SQL Server queries.

Is my query sent anywhere?

No. Formatting happens in your browser, so queries containing table or column names never leave your machine.

Use it from code · API

Input: text, mode. No account needed within the free limit; a token with tools.tool.run raises it.

curl -X POST https://openvibe.tools/api/v1/tools/sql/run \
  -H 'Content-Type: application/json' \
  -d '{"input":{"text":"select * from t where a = 1"}}'

JSON Schema · OpenAPI · API docs

Build with it: Make your own tool from it · Run it on a schedule or from a private link