SQL Minifier
Compress SQL queries onto a single line, removing comments and redundant whitespace.
About the SQL Minifier
The SQL Minifier compresses queries onto a single line by removing comments and extra whitespace, which is handy for logs, environment variables and code that embeds SQL strings.
Everything runs in your browser, so your input is never uploaded to a server.
How to use the SQL Minifier
- Paste SQL.
- Review the single-line result.
- Copy it into your code or configuration.
Frequently asked questions
Are string literals changed?
No. Whitespace inside quoted strings is kept exactly as written.
Are comments removed?
Yes, both -- line comments and /* block */ comments are removed.
Related tools
JSON Minifier
Minify JSON by removing all unnecessary whitespace. Shows the size saved.
HTML Minifier
Minify HTML by removing comments and collapsing whitespace while preserving pre, textarea, script and style blocks.
CSS Minifier
Minify CSS by stripping comments and whitespace to reduce stylesheet size.
JavaScript Minifier
Minify and mangle JavaScript with Terser for smaller bundles. Supports modern ES syntax.
XML Minifier
Minify XML by removing comments and whitespace between tags.
JSON Formatter
Format and beautify JSON with configurable indentation and optional key sorting. Errors are reported with exact line and column.