⚙️ TOML 转 JSONTOML to JSON Converter
把 TOML 配置(如 Cargo.toml、pyproject.toml)转换为 JSON,完整支持 TOML 1.0:表、数组表、内联表、日期时间,超大整数不丢精度。Convert TOML config (Cargo.toml, pyproject.toml…) to JSON with full TOML 1.0 support — tables, arrays of tables, inline tables, dates — and no precision loss on big integers.
使用说明与常见问题How-to & FAQ
「TOML 转 JSON」是什么?What is the TOML to JSON Converter tool?
把 TOML 配置(如 Cargo.toml、pyproject.toml)转换为 JSON,完整支持 TOML 1.0:表、数组表、内联表、日期时间,超大整数不丢精度。Convert TOML config (Cargo.toml, pyproject.toml…) to JSON with full TOML 1.0 support — tables, arrays of tables, inline tables, dates — and no precision loss on big integers.
如何使用「TOML 转 JSON」?How do I use the TOML to JSON Converter tool?
在「TOML 转 JSON」中,把内容粘贴或输入到上方输入框,按需设置「格式」,结果会实时显示在下方,点击「复制结果」即可复制。In the TOML to JSON Converter: Paste or type into the input box, adjust "Format"; the result appears below instantly — click "Copy result" to copy it.
日期时间怎么表示?How are dates represented?
JSON 没有日期类型,TOML 的日期时间会转成 ISO 8601 字符串(带偏移的时间统一换算为 UTC,结尾为 Z,如 07:32:00-08:00 → 15:32:00Z;小数秒最多保留毫秒);本地日期和本地时间如 1979-05-27 保持原样。inf、nan 和超出范围的浮点数(如 1e400)JSON 无法表示,会提示错误。JSON has no date type, so TOML datetimes become ISO 8601 strings (offset datetimes are normalised to UTC with a trailing Z, e.g. 07:32:00-08:00 → 15:32:00Z; fractional seconds are kept to milliseconds); local dates and times like 1979-05-27 are kept as written. inf, nan and out-of-range floats (such as 1e400) cannot be represented in JSON and give an error.
用的是什么解析器?Which parser is used?
smol-toml(BSD-3-Clause 许可),通过 TOML 1.0 官方测试套件。smol-toml (BSD-3-Clause), which passes the official TOML 1.0 test suite.
数据会上传吗?Is my data uploaded?
不会。转换完全在浏览器本地进行,适合处理内部数据。No. Conversion happens entirely in your browser, so it is safe for internal data.
「TOML 转 JSON」免费吗?需要注册吗?Is the TOML to JSON Converter free? Do I need an account?
「TOML 转 JSON」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The TOML to JSON Converter is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.