TOML to JSON Converter

Parse TOML config files into JSON, with line numbers when something is wrong.

100% Client-Side Processing — your data never leaves this browser. Works offline. How it works

0 lines • 0 bytes Ready
Tip: drop a file anywhere on the editor
Input
Paste, type or drop a file
1
Result
Updates as you type
// Output will appear here…
About this tool

How the TOML to JSON works

Convert TOML to JSON: tables, arrays of tables, inline tables, multi-line strings, dates and number formats. Clear line-numbered errors. Free and private.

How to use the TOML to JSON

  1. Paste TOML or upload a .toml file.
  2. Fix any error shown with its line number.
  3. Copy or download the JSON.

TOML to JSON example

Input
title = "App"

[server]
port = 8080
debug = false
Result
{
  "title": "App",
  "server": {
    "port": 8080,
    "debug": false
  }
}

When to use it

  • Reading TOML configs in tools that only understand JSON.
  • Checking what a TOML file really contains.
  • Converting project metadata for scripts.

Tip: TOML forbids defining the same key or table twice; the error message points to the line of the second definition.

Full TOML syntax

Tables, dotted keys, [[arrays of tables]], inline tables and multi-line arrays with comments.

All string types

Basic, literal and multi-line strings with escape sequences.

Number formats

Underscores (5_000), hex, octal, binary, inf and nan are understood.

Helpful errors

Duplicate keys, redefined tables and syntax errors are reported with the line number.

FAQ

Common questions

How are TOML dates converted?

Dates and times become ISO strings such as "1979-05-27T07:32:00-08:00", because JSON has no date type.

Which files can I paste?

Any TOML: pyproject.toml, Cargo.toml, netlify.toml, Hugo or Alacritty configs.

Are comments kept?

No, JSON has no comments, so they are dropped.

Is my config uploaded?

No, parsing happens in your browser.