JSON ↔ YAML ↔ TOML Converter
Convert between JSON, YAML, and TOML in any direction.
Your config files never leave your deviceConvert JSON to YAML or TOML online
About this JSON, YAML and TOML converter
Paste a config file in JSON, YAML, or TOML and get it back in any of the other two formats. The input format is auto-detected (you can override it), conversion happens live as you type, and parse errors point to the exact line — handy when a Kubernetes manifest or a pyproject.toml refuses to load and you need to see why. JSON output supports 2- or 4-space indentation.
The three parsers are written from scratch in plain JavaScript and run entirely in your browser, so docker-compose files, CI workflows, Cargo manifests, and anything containing tokens or connection strings never leave your device. Where a format can’t express something — TOML has no null, YAML anchors have no JSON equivalent — the tool stops with a clear message instead of silently corrupting your data.
Silent changes to watch for
These conversions succeed and then bite you later. The ones worth checking before you trust the output:
| Watch for | What happens |
|---|---|
| The YAML "Norway problem" | Most YAML parsers (PyYAML and anything on YAML 1.1) read unquoted no, yes, on and off as booleans, so a country list like [NO, SE, FI] becomes [false, ...]. This tool follows YAML 1.2 and keeps them as text, but quote "NO" anyway if a 1.1 parser will read the file. |
| Values that only look numeric | A version like 1.20 or a code like 0755 can be read as a number and lose the leading or trailing zero. Quote anything that must stay literal. |
| null going to TOML | TOML has no null. Converting JSON that contains null to TOML errors here rather than guessing — remove or replace the nulls first. |
| Anchors, aliases, merge keys | YAML &anchor, *alias and << are outside this tool's subset; it reports an error instead of silently expanding them. |
| Duplicate keys | Two keys with the same name: the last one usually wins silently. Check the source. |
| Integers past 2^53 | Large IDs and snowflakes lose precision through the JSON step. Keep them as strings. |
Quick ways to check a file yourself:
yq -o=json '.' config.yamlpython -c "import tomllib; print(tomllib.load(open('f.toml','rb')))"FAQ
Which YAML features are supported?
The subset that covers real-world config files: block mappings and sequences, inline [ ] and { } collections, quoted and plain scalars, | and > multiline blocks, and comments. Anchors (&), aliases (*), custom tags (!!), and multi-document streams are rejected with a clear error instead of being guessed at.
Why does converting to TOML fail on my document?
The most common reason is a null value: TOML simply has no null type, so the tool names the exact key you need to remove or replace. TOML also requires an object at the top level — a bare array or scalar can’t be a TOML document.
Are TOML dates and integers preserved?
Dates and times pass through as strings, since JSON and YAML have no native date type. Integers, floats, booleans, underscores in numbers (1_000_000), and hex/octal/binary literals are all parsed; integers beyond 2^53 may lose precision because JavaScript numbers are 64-bit floats.