SQL Minifier

Put a multi-line SQL query on one line — for logs, code strings or CLI commands.

● Your files are processed locally in your browser and are not uploaded to our servers.

How it works

The query is tokenized so that string literals, quoted identifiers and comments are recognized: comments are removed, whitespace outside literals is collapsed and the spaces around commas and parentheses are tightened. Text inside quotes is never changed.

FAQ

Are -- comments safe to remove?

Yes — and they must be removed when putting SQL on one line, otherwise everything after them would be commented out.