← All Tools

SQL Minifier Formatter🔒 100% local

Minify SQL. Privacy-first, no server uploads, no tracking.

Related Tools

Border Radius PreviewBox Shadow GeneratorCode Heatmap

Reduces a SQL statement to a single compact line. It removes -- line comments and /* */ block comments first, collapses every run of whitespace to one space, deletes the spaces around punctuation and operators, and upper-cases a fixed list of keywords. The work happens entirely in the page.

How to use it

  1. Paste the statement, or keep the default SELECT * FROM users WHERE id=1; that is already there.
  2. Press Process to get the minified statement in the Output panel.
  3. Press Copy Output, then paste it wherever the space matters.

Worked example

SELECT * FROM users WHERE id = 1; -- xbecomesSELECT*FROM users WHERE id=1;

The trailing comment is dropped and the operators lose their surrounding spaces, so the star is welded to its neighbours.

SELECT /* x */ 1 FROM tbecomesSELECT 1 FROM t

A block comment is replaced by a single space rather than removed outright, so a space remains between the two words around it.

When to use it

What it does not do