WebTool

SQL Formatter

Free online SQL formatter for MySQL, PostgreSQL, SQL Server and SQLite: uppercase keywords and indented subqueries.

Privacy: all processing happens locally in your browser. Your input never leaves your device.

What is SQL Formatter?

SQL printed by an ORM is usually one long concatenated line that is painful to read when chasing slow queries. This tool restores compressed SQL to a standard layout with uppercased keywords and level-by-level indented subqueries, with dialect switching for MySQL, PostgreSQL, SQL Server, SQLite and more — complex JOINs and nested subqueries become clear at a glance.

How to Use

  1. Paste a SQL statement
  2. Choose the database dialect
  3. It formats automatically — copy the result

FAQ

Which database dialects are supported?
MySQL, PostgreSQL, MariaDB, SQL Server (T-SQL), SQLite, standard SQL and more — the dialect affects keyword and identifier-quoting handling.
Does formatting change SQL semantics?
No. Only whitespace, line breaks and keyword casing are adjusted; the statement logic stays exactly the same.

Related Tools

Last updated 2026-09-04