{ } 2DevKit
Tools / Data & JSON

SQL Formatter

Format and indent SQL queries online with PostgreSQL, MySQL, SQLite, SQL Server and Oracle dialect options. All processing is local.

Formats SQL syntax without executing queries. It is not a SQL validator or query optimizer.

Everything runs locally in your browser.

What is SQL Formatter?

Readable SQL is easier to review, maintain and debug. This formatter recognizes common SQL constructs and supports dialect-specific formatting for PostgreSQL, MySQL, SQLite, SQL Server, Oracle PL/SQL and standard SQL. It only formats text; it does not execute queries, verify schema compatibility, or optimize query plans.

How to use this tool

  1. Paste SQL into the editor and choose the relevant dialect.
  2. Choose indentation and keyword casing, then format.
  3. Copy the formatted query or download it as a .sql file.

Example

select id,name from users where active=1; → SELECT id, name FROM users WHERE active = 1;

Related developer tools