1. Home
  2. Developer tools
  3. TOML ⇄ JSON & YAML

TOML ⇄ JSON & YAML

Move settings between Rust, Python, Hugo and other tools that use TOML and those that expect JSON or YAML, and check TOML syntax along the way.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use TOML ⇄ JSON & YAML

  1. Paste TOML, JSON or YAML.
  2. Choose the output format.
  3. Copy or download the result.

Features

  • Format detected automatically
  • TOML 1.0 parser with clear error messages
  • Tables, arrays of tables, inline tables and dates
  • YAML output keeps dates; JSON gets ISO 8601 strings
  • Re-formats a file when input and output match

Supported formats

You can open

  • TOML
  • JSON
  • YAML

You get

  • JSON
  • YAML
  • TOML

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the TOML ⇄ JSON & YAML is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Comments are not carried over when converting.

Guide

Converting between TOML, JSON and YAML

TOML is the configuration format of Rust (Cargo.toml), modern Python packaging (pyproject.toml), Hugo, Netlify and many command-line tools. It reads like an INI file but has real types: strings, integers, floats, booleans, dates, arrays and nested tables. Sometimes you need the same data as JSON for a script or as YAML for another tool, or you need to know why a TOML file will not load. This converter handles all three formats.

How the formats map

All three describe the same structures: maps of keys to values, lists and scalars. In TOML, a [server] header starts a table, which becomes a JSON object under the key server. Dotted keys such as pool.max = 10 and inline tables such as pool = { min = 2, max = 10 } are other ways of writing nested objects. A [[routes]] header starts one element of an array of tables, so two [[routes]] blocks become a JSON array with two objects.

Detecting the input

Paste any of the three and the format is detected: text that starts like a JSON object is read as JSON, text with [table] headers or key = value lines as TOML, and anything else as YAML. The input panel’s title shows what was detected, so you can tell if detection guessed wrong.

Dates and numbers

TOML has first-class dates and times. Converting to YAML keeps them as timestamps, and TOML output writes them back unquoted. JSON has no date type, so they become ISO 8601 strings such as 2026-10-29T09:00:00.000Z. Integers in TOML are 64-bit; JSON numbers in JavaScript are exact only up to 2⁵³, so very large integers may lose precision when converted to JSON.

What does not survive

Comments are not part of the data model of any of these parsers, so they are dropped. Formatting details such as alignment, blank lines and the choice between dotted keys and tables are normalised. Keep your original file under version control and reapply comments by hand if they matter.

Producing TOML

TOML documents must be a table at the top level. JSON or YAML that is an object converts directly; an array or a single value at the top level cannot be written as TOML, and the tool explains why. Nested objects become tables and arrays of objects become arrays of tables, which is the idiomatic TOML style.

Checking syntax

Converting is also a quick validator. If the TOML is invalid — a string without quotes, a table defined twice, a key assigned twice — the parser reports the first error with its position. Fix it and the output appears immediately.

A worked example

The sample configuration has a title, a release timestamp, a [server] table, a [database] table with an inline pool, and two [[routes]]. As JSON, server.port is 8080, database.pool.max is 10, routes is an array whose second entry allows GET and POST, and released becomes "2026-10-29T09:00:00.000Z". As YAML, server: is followed by host: 0.0.0.0 on an indented line.

Pyproject and Cargo tips

In pyproject.toml, dependencies are an array of strings under [project], while tool settings live in [tool.name] tables; converting to JSON is a handy way to see exactly which table a setting belongs to. In Cargo.toml, [dependencies] entries can be a version string or an inline table with features, and both forms convert cleanly.

Switch YAML and JSON with YAML to JSON, tidy JSON in the JSON Formatter, move environment variables with the .env Converter, or model the configuration in Rust with JSON to Rust.

Checked against the current version of the TOML ⇄ JSON & YAML on .

Troubleshooting

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Which tools use TOML?

Rust’s Cargo.toml, Python’s pyproject.toml, Hugo and Zola site configs, Netlify’s netlify.toml, Deno and many others. It was designed to be easy to read and to map unambiguously to a hash table.

Why does a converted date have .000Z at the end?

JSON has no date type, so a TOML date-time becomes a string in the ISO 8601 form JavaScript produces, with milliseconds and Z for UTC. The moment in time is the same; reformat it if a program expects another layout.

What if my TOML has a syntax error?

The parser stops at the first problem and reports it, usually with the line and column. Common causes are unquoted strings, a table defined twice, and arrays that mix types in ways the specification does not allow.

Why are my comments gone?

Converting goes through data, and JSON has no comments, so they are not carried over. Keep the original file if its comments matter, and copy them back by hand.

Can every JSON file become TOML?

Only if the top level is an object. TOML documents are tables, so a JSON array or a single value at the top level cannot be written as TOML; wrap it in an object first.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.