代码工具

SQL 格式化

Format SQL queries, switch database dialects, minify snippets, and copy clean SQL locally.

SELECT
  u.id,
  u.email,
  count(o.id) AS orders
FROM
  users u
  LEFT JOIN orders o ON o.user_id = u.id
WHERE
  u.created_at >= now() - interval '30 days'
GROUP BY
  u.id,
  u.email
HAVING
  count(o.id) > 0
ORDER BY
  orders DESC
LIMIT
  20;

功能亮点

Dialect Options

Format common SQL dialects including PostgreSQL, MySQL, BigQuery, SQLite, and T-SQL.

Case Controls

Choose uppercase, lowercase, or preserved keyword casing.

Indentation

Tune tab width, expression width, and operator newline behavior.

Minify Mode

Collapse whitespace for compact query strings and config values.

Copy Output

Copy formatted or minified SQL directly from the result panel.

Local Workspace

Queries are formatted in the browser with no database connection.

常见问题

No. It only formats text locally and never connects to a database.

Use the dialect closest to your database. PostgreSQL is a good default for common SQL syntax.

Yes. The minify option collapses whitespace while preserving the query text.

持续增长的高效、隐私优先开发者工具集合。所有工具都在浏览器中运行,数据不会离开你的设备。

工具

JSON 解析器JSON Schema 校验器JSON 转换器JSON 转 TypeScriptOpenAPI 查看器代码格式化SQL 格式化cURL 转换器时间戳转换器Cron 解析器URL 编码器二维码工具IP 与 CIDR 计算器Gzip 与 Deflate 工具JWT 解码器JWT 验签与 JWK 工具哈希生成器密码与 TOTPBase64 编码器UUID 生成器图片元数据图片压缩Tiny 图片压缩器图片工具箱 Pro屏幕录制正则测试器文本 DiffMarkdown 与 Mermaid 预览颜色与对比度工具

法律

隐私政策服务条款

© 2026 ZPTools. 保留所有权利。