Skip to content
Rotina Diária

Format SQL

Make SQL queries easier to read with consistent indentation and keywords, for PostgreSQL, MySQL, SQL Server, and SQLite.

Processed on your device. Nothing you type is sent anywhere.

How to use: Format SQL

  1. Paste your query (or multiple queries separated by ;) or open a .sql file.
  2. Choose the database, keyword case (UPPERCASE or lowercase), indentation, and style.
  3. Copy the formatted SQL or download the file.

About this tool

Each database has its own syntax: [brackets] and TOP in SQL Server, `backticks` in MySQL, and ::cast and $1 in PostgreSQL. Choosing the right dialect helps the formatter recognize these details instead of treating them as errors.

The tabular style aligns keywords in a column on the left (or right), a common convention among data teams. Formatting doesn't change the query logic—only spaces, line breaks, and keyword casing.

Queries containing table names, column names, and customer data can be formatted safely. Everything runs in your browser: nothing you paste or type is sent to a server.

Frequently asked questions

Does the tool run or validate the query against the database?

No. It only reformats the text. Major syntax issues (unclosed parentheses or quotation marks) are flagged, but table and column names aren't checked.

Does it work with stored procedures and multiple statements?

Yes. Statements separated by semicolons are formatted individually, with a blank line between them.

Which dialect should I use for MariaDB or Oracle?

For MariaDB, choose MySQL. For Oracle and other databases, standard SQL usually works well for common queries.

Is it really free? Is there a daily limit?

It's free with no daily limits. Processing happens on your device, so there's no per-use cost and no need to limit you.

Does it work on phones?

Yes. The site works in any modern browser on Android, iPhone, Windows, Mac, and Linux—no installation needed.