TOML Converter: TOML to JSON, YAML and Back
Convert between TOML, JSON, and YAML in your browser. Turn a config file into TOML or read TOML back into JSON or YAML instantly.
A converter that bridges TOML with JSON and YAML in any direction. Pick a source format and a target format, paste your text, and the conversion happens live as you type. It parses TOML to a data tree and re-serializes it as JSON or YAML, or goes the other way to produce a valid TOML config file. Useful when a tool wants one format but you have another. Everything is parsed and converted locally, so config secrets never leave your browser.
TOML (Tom's Obvious Minimal Language) is the configuration format behind Rust's Cargo, Python's pyproject.toml, and many other tools, because it reads cleanly and maps directly to a key-value tree. JSON is the lingua franca of APIs and JavaScript, and YAML dominates CI pipelines and Kubernetes manifests. Moving a config between these worlds by hand is tedious and error-prone. This converter does it in one step: choose the format you have, choose the format you need, and paste.
Under the hood the input is parsed into a single in-memory data structure, then written out in the target syntax. That round trip is what makes a faithful TOML-to-JSON or JSON-to-TOML conversion possible rather than a fragile text substitution. The From and To selectors cover all six directions among the three formats, and a swap button flips them while carrying the current output back into the input so you can chain conversions.
A few format limits are worth knowing. TOML has no null value and requires a top-level table, so converting JSON that is a bare array or that contains null will report a clear error instead of producing invalid TOML. JSON and YAML accept an indent setting; TOML uses its own fixed layout. When a conversion cannot be expressed in the target format, the tool explains why rather than emitting something that will not parse.
- 1
Choose the formats
Set the From selector to the format you are pasting and the To selector to the format you want. All combinations of TOML, JSON, and YAML are supported.
- 2
Paste your text
Type or paste into the input box. The converted result appears in the output box immediately, updating on every change.
- 3
Copy, download, or swap
Copy the output, download it with the right extension, or hit swap to flip the direction and feed the result back in for a follow-up conversion.
Read a Cargo or pyproject file
Convert a Rust or Python TOML config into JSON to inspect it with familiar tooling or feed it to a script.
Generate a TOML config
Turn a JSON or YAML snippet into TOML so you can drop it straight into a tool that expects TOML configuration.
Migrate between config formats
Move settings from a YAML pipeline file to TOML, or the reverse, without rewriting each key by hand.
Validate TOML syntax
Paste TOML and watch for a parse error in the output. A clean conversion confirms the file is well-formed.
Which conversions are supported?
All six directions among TOML, JSON, and YAML: TOML to JSON, TOML to YAML, JSON to TOML, JSON to YAML, YAML to TOML, and YAML to JSON. Pick any source and any target.
Why does converting some JSON to TOML fail?
TOML requires a top-level table (an object) and has no null type. JSON that is a bare array, or that contains null, cannot be represented in TOML, so the tool reports a clear error instead of writing invalid output.
Does it preserve comments?
No. Conversion works by parsing your text into a data structure and re-serializing it, and comments are not part of that data. The keys, values, and nesting are preserved; inline comments are dropped.
What about dates and numbers?
TOML's native date and number types are parsed and carried through where the target format supports them. JSON has no date type, so TOML datetimes become strings when converting to JSON.
Is my configuration data private?
Yes. Parsing and conversion run entirely in your browser. Nothing you paste is uploaded, which matters when a config file holds tokens, hostnames, or other sensitive values.