Unicode Code Point Lookup
Inspect any character: code point, block, category, UTF-8 bytes and escapes.
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 reviewInspect any character: code point, block, category, UTF-8 bytes and escapes.
Press any key and see event.key, event.code and the modifier state.
See your own user agent string and what a server can tell from it.
Hash a password with bcrypt, or check one against an existing hash.
Score a selector and find out which of two rules actually wins.
Generate an RSA key pair in PEM form, in your browser.
Convert HTML into valid JSX, with every attribute renamed correctly.
Generate ULIDs — sortable by creation time and case-insensitive.