TOML to JSON

TOML in, JSON out, with the failing line named.

FREE - NO SIGN-UP - RUNS ON YOUR DEVICE

Runs in your browser tab

  • TOMLin
  • JSONout
  • 0uploads
  • 1 tapto save
Specification

TOML to JSON at a glance

Opens on
TOML into JSON
Tables
Tables become objects
Dates
Dates become text
Errors
Sentence with line and column
Price
Free
Account needed
None
Where processing happens
On your device
How to

How to use TOML to JSON

  1. 1

    Paste your TOML

    Paste your TOML.

  2. 2

    Read the JSON

    Read the JSON.

  3. 3

    Copy or download

    Copy or download.

Questions

Frequently asked questions

What happens to TOML dates?

They come across as text. JSON has no date type, so a TOML date or timestamp is written as the string it looked like in the file.

Are table arrays supported?

Yes. A repeated table header becomes a list of objects in the JSON, which is how a Cargo dependency block or a set of build steps comes across.

Can I go the other way?

Yes, with one thing to know: TOML needs a named table at the top level, so a plain JSON list is written under a key called rows and the panel says so.

Background

Notes on TOML

The panel opens already set to TOML in and JSON out, with a sample loaded. Replace it with your own config and the JSON appears as you type. Both selectors still move.

  • A repeated table header is a table array, and becomes a list of objects.
  • Dates and timestamps come across as text, because JSON has no date type.
  • Going the other way, a top-level list is written under a key called rows.

Full specification

Specification of the TOML to JSON tool
Opens onTOML in, JSON out. Both selectors change without leaving the page.
TablesA table becomes an object and a table array becomes a list of objects.
DatesTOML date and time values come across as text, because JSON has no date type.
ErrorsA sentence naming the line and column, with what the parser expected there.
PriceFree. Supported by clearly labelled ads outside the working area.
Account neededNo.
Where processing happensIn your browser tab. Nothing is uploaded.
Next step

Keep going with the same files

All developer tools: Developer tools on SPOTTOOLS