Runs locally
$ devdesk sql--local
Format & documents

SQL formatter for MySQL, PostgreSQL and SQLite

Format SQL indentation and keywords for SQL, MySQL, PostgreSQL and SQLite. Try query examples locally without connecting to a database or executing SQL.

Loading local tool…

How to use

Choose the database dialect and format. Queries are never executed or sent to a database.

Your input stays yours

Step by step

  1. Select the dialect that matches the query.
  2. Paste the statement and choose Format.
  3. Review conditions, joins and parameters before copying; use Text diff to inspect changes.

Query example: filtering and sorting

select id, name from users where active = true order by id desc;

The default SQL dialect separates and indents SELECT, FROM, WHERE and ORDER BY. This example does not connect to a users table.

Frequently asked questions

Does formatting execute the query?

No. There is no database connection or table access. Output is text only.

Does it check performance or semantics?

No. Successful formatting does not prove that columns exist, permissions are correct or the execution plan is efficient. Validate those separately in an appropriate database environment.

Why do placeholders or vendor-specific constructs fail?

Check the dialect first. Template variables, ORM fragments or database extensions may not parse. Isolate the issue with a minimal valid example instead of changing business conditions in the original query.