Skip to content
migration.tools
SQL to Formatted SQL

SQL formatter

Make a one-line query from a log or an ORM readable, or shrink a formatted script before embedding it. Choosing the right dialect matters: it decides how quoting, operators and vendor keywords are recognised.

Options

SQL

Formatted SQL

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your SQL or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the Formatted SQL or download it. Drop several files to convert a batch into one ZIP.

Why format before a migration review

Converted SQL is easier to check when both versions are laid out the same way. Format the original and the converted script with the same settings and a diff shows only the real changes — types, quoting, functions — instead of whitespace noise.

Minify mode removes comments and collapses whitespace without touching string literals, which is useful for embedding a query in a config file or URL.

Questions

Does formatting change what the query does?

No. Only whitespace and keyword case change. String literals, identifiers and comments are left exactly as written (comments are removed only in minify mode).

Guides that use this tool