TOML → JSON

About the TOML ↔ JSON playground

TOML ↔ JSON converts TOML configuration into JSON and back again. TOML tables become JSON objects, arrays map directly, and typed values like integers, booleans, and dates are preserved. It's useful for inspecting a TOML config as JSON, feeding it to JSON-only tooling, or generating a TOML file from existing JSON data — the conversion works in both directions.

TOML (Tom's Obvious, Minimal Language) is a configuration format designed to be easy to read, with explicit tables, key-value pairs, and first-class date and number types. JSON (JavaScript Object Notation) is the ubiquitous data-interchange format of objects and arrays. This converter maps TOML's tables and typed scalars onto JSON's structure and back, bridging human-friendly config with machine-friendly interchange.

HostedTOML ↔ JSON runtime
mainentry file
single fileworkspace
stdinprogram input

How it works

1

Write

The main file is the entry point for each run.

2

Give it input

Use the Input panel to pipe standard input to your program when it needs data.

3

Run

Run sends your code to a fresh hosted runtime and streams the result into the output panel.

4

Keep or share

Your draft stays in this browser, and Share creates a separate snapshot link.

External resources

  • toml.io— Official website
  • GitHub— Official spec repository

Input (TOML)

title = "Demo"
[owner]
name = "Ada"
active = true

Output (JSON)

{
  "title": "Demo",
  "owner": {
    "name": "Ada",
    "active": true
  }
}

Input (TOML array)

ports = [80, 443]
hosts = ["a", "b"]

Output (JSON)

{
  "ports": [80, 443],
  "hosts": ["a", "b"]
}

Input (TOML array of tables)

[[products]]
name = "Hammer"
sku = 738

[[products]]
name = "Nail"
sku = 284

Output (JSON)

{
  "products": [
    { "name": "Hammer", "sku": 738 },
    { "name": "Nail", "sku": 284 }
  ]
}

Input (TOML nested table)

[servers.alpha]
ip = "10.0.0.1"
port = 8080

Output (JSON)

{
  "servers": {
    "alpha": {
      "ip": "10.0.0.1",
      "port": 8080
    }
  }
}

Input (TOML typed values)

count = 42
ratio = 3.14
enabled = false
ts = 1979-05-27T07:32:00Z

Output (JSON)

{
  "count": 42,
  "ratio": 3.14,
  "enabled": false,
  "ts": "1979-05-27T07:32:00Z"
}

Input (TOML inline table)

point = { x = 1, y = 2 }
name = "origin"

Output (JSON)

{
  "point": { "x": 1, "y": 2 },
  "name": "origin"
}

Input (TOML numbers)

big = 1_000_000
hex = 0xFF
ratio = 6.626e-34

Output (JSON)

{
  "big": 1000000,
  "hex": 255,
  "ratio": 6.626e-34
}

How it works

The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.

Two-way workflow

Paste TOML to get JSON, or paste JSON to generate TOML.

TOML tables map to JSON objects and arrays map directly.

Type handling

Typed values like integers, booleans, and dates are preserved.

Dotted keys and [table] headers become nested object structure.

Arrays of tables round-trip into arrays of objects.

Privacy

Both directions run locally in your browser; nothing is uploaded.

Fine for config holding sensitive values.

Tips

Inspect a TOML config as JSON to feed JSON-only tooling.

Generate a starter TOML file from existing JSON data.

Every shortcut, searchable:

Editing

Undo
Ctrl+Z
Redo
Ctrl+⇧+Z
Select next occurrence
Ctrl+D
Delete line
Ctrl+⇧+K
Move line up / down
Alt+↑ / ↓
Copy line up / down
Alt+⇧+↑ / ↓
Toggle comment
Ctrl+/
Indent line
Ctrl+]
Outdent line
Ctrl+[

Navigation

Find
Ctrl+F
Find & replace
Ctrl+H
Go to line
Ctrl+G
Go to symbol
Ctrl+⇧+O

Selection

Select all
Ctrl+A
Select line
Ctrl+L
Select all occurrences
Ctrl+⇧+L
Shortcuts follow your OS — ⌘ becomes Ctrl on Windows and Linux.
It parses TOML and outputs the equivalent JSON, mapping tables to objects and preserving typed values, and can convert JSON back to TOML.
Yes, it's bidirectional: convert TOML to JSON or JSON to TOML.
No. The conversion runs in your browser, so your config never leaves your device.
Yes, free with no account or limits.
A [table] becomes a nested JSON object, and [[array of tables]] becomes a JSON array of objects.
ini
json

Output

JSON output

>_compilebytes

A fast place to write code and run it in isolated hosted runtimes. Free, forever.

Playgrounds

Python compilerC compilerJavaScript compilerC++ compilerTypeScript compilerGo compilerJava compilerRust compiler
All playgrounds →

Tools

JSON formatterRegex testerBase64 encoderJWT decoder
JSON formatterBase64 encoder & decoderRegex testerJWT decoder
All tools →

Company

TermsPrivacy[email protected]
© 2026 compilebytes115 runtimes · no signup115 runtimes · isolated sandboxes · no signup