RSA Key Generator
Generate an RSA key pair in PEM form, in your browser.
Collapse a SQL query to one line and strip its comments.
The SQL Minifier collapses a query onto one line and strips both comment styles, while preserving whitespace inside string literals — because that is content, not formatting.
Sometimes a query has to become one line: pasting it into a JSON field, a YAML config, a shell command, a log message or a single-line string in code. The minifier collapses the whitespace, strips the comments and leaves a statement that still runs exactly as before.
The tokeniser is what makes that safe. Whitespace inside a string literal is content and is preserved; whitespace between tokens is formatting and is reduced to a single space, or removed entirely beside punctuation. A double-dash inside a string is not a comment, and a comment containing a quote does not unbalance the rest of the statement. Both comment styles are removed, which is usually the bigger saving on a query with a header block.
Two spaces inside a literal stay two spaces, because the tokeniser knows the difference between content and formatting.
Double-dash and slash-star comments are stripped — and a double-dash inside a string is correctly left alone.
No space before a comma or a closing bracket, one space between tokens, so the result reads as SQL rather than a jumble.
Size before and after and the percentage removed, which on a query with a header comment block can be substantial.
Paste the result into the SQL Formatter to get a readable version back, though the comments are gone for good.
A formatted query, a migration or a stored procedure body.
Comments are stripped and the whitespace collapses to single spaces.
The stat row shows the size before and after and the percentage removed.
Ready to paste into a config field, a log line or a code string.
No. The database parses and plans the statement either way, and whitespace costs nothing measurable. Minify for the container the query has to fit into, not for speed.
Yes. A literal such as 'a b' keeps both spaces, because the tokeniser knows it is inside a string rather than between tokens.
Yes — double-dash line comments and slash-star block comments. A double-dash inside a string literal is not treated as a comment.
Paste the result into the SQL Formatter to get a readable layout back. The comments cannot be recovered, so keep the original if they matter.
What people who use the SQL Minifier think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the SQL Minifier. It takes half a minute and no account.
Write the first reviewGenerate an RSA key pair in PEM form, in your browser.
Break a user agent string into browser, engine, operating system and device.
Build a docker-compose.yml with databases, caches and health checks.
Read a cron expression in plain English and see when it next runs.
Generate MAC addresses that are correctly marked as locally administered.
Generate Python dataclasses with type hints from a sample JSON document.
Generate prefixed API keys in the format modern providers use.
Fix broken JSON: trailing commas, single quotes, unquoted keys and comments.