SQL Minifier

Your data never leaves your browser

Minify SQL by removing comments, extra whitespace, and newlines into a single line.

Brie — Bug Reporting Tool

Debugging query results?

Brie captures the full context around bugs — console logs, network data, and user actions — so you can trace issues back to the source.

About SQL Minifier

Compress your formatted SQL query into a compact single-line version. All single-line (--) and multi-line (/* */) comments are stripped, extra whitespace is collapsed, and all line breaks are removed. Useful for embedding SQL strings in code, logging, or reducing query display size.

How to use

  1. Paste your formatted SQL into the input panel.
  2. The minified single-line SQL appears instantly in the output panel.
  3. Click Copy to embed the compact query in your code.

More SQL Tools

Frequently Asked Questions

FAQs about SQL Minifier

Are SQL comments removed?

Yes. Both single-line comments (-- comment) and multi-line block comments (/* ... */) are stripped during minification.

Will the minified SQL still execute correctly?

Yes. Minified SQL is functionally identical to formatted SQL — databases parse both the same way.

Is this useful for embedding SQL in code?

Yes. A single-line SQL string is easier to embed in string literals in JavaScript, Python, or other languages without multiline string concerns.

Does it affect string literals inside the query?

Whitespace inside quoted string values (e.g. WHERE name = "John Doe") is preserved. Only whitespace outside string literals is collapsed.

Is my data safe?

All processing runs in your browser. No SQL is ever sent to a server.