Skip to content
Free Online Tools
All Tools Text Tools Developer Tools Generators Converters Calculators Data & Converters Web & Design Encoders & Ciphers Networking Games About Blog News

SQL Minifier

Developer Tools 100% in-browser

Strip comments and collapse whitespace to compress SQL into a single line.

How to use the SQL Minifier

  1. 1 Paste your SQL query.
  2. 2 Comments and extra whitespace are removed instantly.
  3. 3 Copy the minified SQL.

About the SQL Minifier

Minifying SQL is handy for logging queries on one line or embedding them in code. This tool removes line and block comments and collapses whitespace while keeping the query valid.

Everything runs in your browser.

Frequently asked questions

Does it remove comments?

Yes, both -- line comments and /* block comments */ are removed.

Will it change my query’s meaning?

No — only whitespace and comments are removed.

Related tools

JSON Formatter & Viewer Paste JSON to beautify, validate and explore it in a live collapsible tree — with search, expand/collapse and JSONPath.
Sort & Dedupe Lines Sort lines A→Z or Z→A, or remove duplicate lines.
Remove Line Breaks Strip line breaks from text, or replace them with spaces.

More from us

Recently used