How to minify SQL queries online

Paste formatted SQL — get a compressed one-liner with comments and extra whitespace removed.

Formatted SQL is readable; minified SQL is smaller for transport and storage. The SQL Minifier strips comments and collapses whitespace — entirely in your browser.

Try it — paste SQL to minify

How it works

  1. Paste SQL — SELECT, INSERT, or any query with comments.
  2. Minified output — updates as you type.
  3. Copy — one-liner ready for logs or embedded queries.

When to minify

Use minified SQL when size matters: mobile payloads, audit logs, or storing query templates. For readability, pair with the SQL Formatter.

Privacy

Queries never leave your device. Safe for production schemas and sensitive table names.