Skip to content
Schedule a Call

Format SQL

Format and beautify SQL queries for MySQL, PostgreSQL, SQL Server, SQLite, Oracle, BigQuery and more, or minify them. Free, private, in your browser.

  • Files never leave your device
  • Free, no sign-up
  • No watermark
Loading tool…

About SQL Formatter

Turn long, single-line SQL into readable, consistently indented queries. Choose your dialect, including MySQL, PostgreSQL, SQL Server, SQLite, Oracle, MariaDB and BigQuery, set the indentation and keyword casing, and format or minify with one click in a code editor with syntax highlighting. Your queries are formatted in your browser and never sent to a server, which matters when they contain table names or customer data.

How to use SQL Formatter

  1. 1

    Paste your SQL into the editor.

  2. 2

    Choose the SQL dialect.

  3. 3

    Set indentation and keyword case.

  4. 4

    Format or minify, then copy the result.

Why use this tool

  • Eight SQL dialects.
  • Uppercase keyword option.
  • Adjustable indentation.
  • Format and minify modes.
  • Code editor with syntax highlighting.

Frequently asked questions

Dialects have different keywords and syntax, so choosing the right one keeps the formatter from misreading your query.

No. Only whitespace and keyword case change.

Yes. The query never leaves your browser.

Standard statements format well. Complex procedural code may need small manual touches.

Yes. Minify removes extra whitespace for embedding queries in code.

No. Everything is processed in your browser tab. Nothing you type or paste is sent to CodeMites or any other server.

Yes. There is no account, no watermark and no usage limit. The tool runs in your own browser, so there is no server cost to charge you for.

Yes. It runs in any modern browser on Android and iOS as well as on Windows, macOS and Linux, with nothing to install.

Yes, once the page has loaded. Everything runs in your browser, so you can keep working on a train or plane without a connection.

Yes. Line and block comments are kept in place when the query is formatted.