SQL Formatter

SQL फ़ॉर्मेटर

Format SQL queries with clause-per-line layout and uppercase keywords.

Runs in your browser – nothing you enter or upload is sent to our server

How to use the SQL Formatter

  1. Paste a query or open a .sql file.
  2. Choose the indent and keyword case.
  3. Click Format SQL, or One line to compact it.

Supported formats: SQL, TXT

Layout rules

Main clauses (SELECT, FROM, JOIN, WHERE, GROUP BY, ORDER BY, LIMIT) start new lines. Column lists after SELECT, SET and VALUES are indented one item per line, AND/OR conditions start new lines, and subqueries are indented. Strings, quoted identifiers and comments are never changed.

The formatter is a readability tool – it does not check whether a query is valid for your database.

Frequently asked questions

Does it change my query’s behaviour?

No. Only whitespace and keyword case change; strings and identifiers stay as they are.

Which databases are supported?

Standard SQL used by MySQL, MariaDB, PostgreSQL, SQLite and SQL Server formats well. Vendor-specific procedural code may need manual touch-ups.