SQL Minifier guide

Open SQL Minifier

Remove ordinary comments and compact whitespace without changing quoted content.

How to use SQL Minifier

Compact a query copied from logs or an editor. The scanner preserves quoted strings, quoted identifiers and PostgreSQL dollar strings. Ordinary comments are removed; executable MySQL comments and optimizer hints are retained.

  1. Select Load example or paste your own test input.
  2. Choose PostgreSQL, SQL Server or MySQL. For generators, set the table name and review each column.
  3. Run the selected action; review any validation message.
  4. Inspect the output before copying, printing or downloading it.

A small example

Input: SELECT id,  name /* display fields */ FROM users;
Output: SELECT id, name FROM users;

When the result looks wrong

Select the matching dialect. Line breaks may be retained to protect SQL string semantics. This is conservative compaction, not an optimizer. Unclosed quotes and block comments must be fixed first.

Questions about SQL Minifier

Does it run SQL or connect to my database?

No. It generates text locally. Review the output and test it separately against your own database.

Which dialect should I select?

Choose the database you will use. Identifier quoting, string escaping, boolean values and column types differ between PostgreSQL, SQL Server and MySQL.

Is my input uploaded?

File and text processing runs in your browser. Opening the website still loads application assets from its host.

What if the result looks wrong?

Select the matching dialect. Line breaks may be retained to protect SQL string semantics. This is conservative compaction, not an optimizer. Unclosed quotes and block comments must be fixed first.

Can I use sensitive production data?

Prefer non-sensitive test data. Never paste live access tokens, passwords or confidential documents into a site without assessing its code and environment.

Explore all tools

Browse all tool categories