JSON to TOML converter
Convert JSON to TOML for Rust, Python, and DevOps config files like Cargo.toml, pyproject.toml, and Hugo. Clean formatting, type-safe. Free online, 500 MB.
Drop a file to convert here
or click to browse
About Tom's Obvious Minimal Language
Common Use Cases
- Generating Cargo.toml or pyproject.toml from JSON data
- Converting config data for Hugo, Deno, or Rust projects
- Creating TOML configs from programmatically generated JSON
TOML is a configuration file format that prioritizes readability and unambiguous semantics. It is the standard config format for Rust (Cargo.toml), modern Python packaging (pyproject.toml), Hugo static sites, Deno, and a growing number of tools that value explicit, type-safe configuration. If you have structured data in JSON and need it in TOML, this converter produces clean, properly formatted output that is ready to use in any TOML-based project.
JSON is a general-purpose data format with no built-in date or time types, while TOML is specifically designed for configuration files with native support for dates, times, and clear table/section headers that make config files easy to scan.
Why Convert JSON to TOML?
Generate configs for Rust and Python projects
Cargo.toml and pyproject.toml are the standard manifest files for Rust and Python projects respectively. If you generate package metadata programmatically in JSON, converting to TOML produces the config file your build tools expect.
Configure Hugo, Deno, and modern tools
Hugo static sites, Deno projects, and many modern developer tools use TOML for configuration. Converting from JSON lets you prepare configs programmatically and output them in the required format.
Readable, section-based config files
TOML uses [section] headers that make config files scannable at a glance. Nested JSON objects become clearly labeled TOML sections, improving readability for anyone who needs to review or modify the config.
Type-safe configuration
TOML distinguishes between strings, integers, floats, booleans, dates, and arrays at the syntax level. Converting from JSON preserves these type distinctions, producing configs where the data types are unambiguous to both humans and parsers.
When to use each
Use JSON when...
- Exchanging data between services and APIs
- The consumer is a JavaScript application
- You need deeply nested data structures
- Generating data programmatically
- The ecosystem has strong JSON tooling
Use TOML when...
- Writing config files for Rust, Python, or Hugo
- The tool specifically requires TOML format
- The config is relatively flat with clear sections
- Humans will read and edit the file frequently
- You want native date/time support in config values
Common use cases
- Generating Cargo.toml or pyproject.toml from JSON data
- Converting config data for Hugo, Deno, or Rust projects
- Creating TOML configs from programmatically generated JSON
How to use
- Upload your JSON file. Drag and drop a .json file onto the upload area, or click to browse. Any valid JSON file up to 500 MB is supported.
- Convert to TOML. Click Convert File. Your JSON is parsed and serialized as clean TOML with proper section headers, type preservation, and standard formatting.
- Download your TOML. Save the .toml file and use it in your Rust, Python, Hugo, or Deno project. Uploaded files are deleted from our servers within 1 hour.
Frequently asked questions
- How are JSON null values handled?
- TOML has no null type. JSON null values are omitted from the output, since there is no way to represent them in TOML. If a null value is critical to your config, you will need to handle it manually.
- Are nested objects converted to TOML tables?
- Yes. JSON objects become TOML tables with [section] headers. Nested objects become sub-tables with dotted paths like [parent.child].
- Can I use this to generate Cargo.toml files?
- Yes. If your JSON matches the structure expected by Cargo (with fields like package, dependencies, and features), the output will be a valid Cargo.toml. Verify the formatting matches Cargo's expectations after conversion.
- Does the converter handle arrays of objects?
- Yes. JSON arrays of objects become TOML arrays of tables, using the [[double.bracket]] syntax. Simple arrays of primitives become standard TOML arrays.
- Is JSON to TOML conversion free?
- Yes. Anyone can convert for free with no signup required. Anonymous users get a daily conversion allowance, registered accounts get higher limits, and Premium or Lifetime members get unlimited conversions.