这个工具做什么?
| 直接答案 | SQL Minifier将所有空白字符压缩为单个空格或在操作符周围删除空白字符,同时保持字面量不变。 |
| 关键事实 | 引号内的空白字符是有意义的,始终保留。 |
| 处理 | 在您的浏览器中本地运行;不会将数据发送到服务器。 |
如何使用
- 将SQL粘贴到输入框中。点击压缩SQL。复制单行查询。
示例
输入
SELECT id, name \[换行] FROM users \[换行] WHERE active = 1
输出
SELECT id,name FROM users WHERE active=1
Who is this for?
This tool was built for people who need a fast answer in the browser — no install, no account, no data leaving the device.
Developers formatting API responses or config files, analysts inspecting minified payloads, and students learning structured data formats. If you have ever squinted at a one-line blob hoping to find a missing brace, this page is for you.
常见问题
压缩后的SQL还能运行吗?
是的——SQL忽略标记之间的多余空白字符;只有字符串字面量保留其空白字符。
注释会被移除吗?
行注释(-- …)作为文本保留;只压缩空白字符。
为什么要压缩SQL?
单行查询更容易嵌入到迁移、种子数据和API负载中。