JSON 转 TOML 在线转换器

Free 免费 · 无需注册 · 数据不上传
Error
JSON
TOML
// TOML output

更多开发工具

JSON 格式化
格式化、验证与压缩
TOML 格式化
格式化与验证
TOML→JSON
转 JSON
JSON→YAML
转 YAML 配置
YAML 格式化
格式化与验证
JSON→CSV
转 CSV 表格
Cron 生成器
构建定时任务
时间戳
Unix ↔ 日期

为什么这是最好的 JSON 转 TOML 工具

What is TOML?

TOML (Tom's Obvious Minimal Language) is a minimal config file format that's easy to read. It's used in Rust's Cargo.toml, Python's pyproject.toml, Hugo, and many other tools.

节头部

Nested JSON objects are converted to TOML [section] and [[array]] headers, the idiomatic TOML way.

正确的类型

Numbers, booleans, null, strings, arrays and nested tables are all mapped to their correct TOML equivalents with proper quoting rules applied.

下载 .toml

Export the result as a .toml file ready to drop into your Rust, Python, Go, or Hugo project.

常见问题

What is the difference between JSON and TOML?

JSON is a general-purpose data interchange format. TOML is designed specifically for configuration files — it's more human-readable, supports comments, and uses section headers instead of deeply nested braces.

How are JSON arrays converted?

Arrays of primitives become TOML inline arrays. Arrays of objects become TOML array-of-tables using the [[table]] syntax.

Does TOML support null values?

TOML has no native null type. JSON null values are converted to the empty string "" and flagged with a comment so you can handle them appropriately.

Where is TOML commonly used?

TOML is used by Rust (Cargo.toml), Python packaging (pyproject.toml), the Hugo static site generator, the uv package manager, Gitea, and many other developer tools.

深度指南
YAML & TOML 配置指南
Kubernetes、Docker、Rust & Python 配置
阅读指南