SQL MinifierCompress multi-line SQL into a single line and strip comments locally.

SQL Minifier

Compress multi-line SQL into a single line and strip comments locally.

Output
SELECT id, name AS user_name, email FROM users WHERE notes <> 'a -- string with dashes' AND created_at > NOW() - INTERVAL '7' DAY;

Features

  • Minify SQL by removing comments and redundant whitespace
  • Optional single-line output
  • Strips both -- line comments and /* block */ comments
  • Browser-local — no SQL leaves your device

Frequently asked questions

What SQL dialects are supported?
Generic SQL syntax — works with MySQL, PostgreSQL, SQL Server, SQLite, and most other relational databases.
Will it remove my comments?
Only when ‘Remove comments’ is enabled. Disable the toggle to keep both line and block comments intact.
Is my query uploaded to a server?
No. Minification runs entirely in your browser.