Boneyard Tools

JSON to TOML Converter

Paste a JSON object to get TOML instantly. Scalars come first, then nested objects become tables and arrays of objects become arrays of tables. Your data stays in your browser.

How to convert JSON to TOML

  1. Paste or type your JSON. The top level must be an object.
  2. The TOML output updates live as you type.
  3. Copy the TOML or download it as a .toml file.

Examples

Object with a nested table

{"title":"My App","owner":{"name":"Ada","active":true}}
title = "My App"

[owner]
name = "Ada"
active = true

Array of objects becomes an array of tables

{"server":[{"host":"a"},{"host":"b"}]}
[[server]]
host = "a"

[[server]]
host = "b"

Frequently asked questions

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser, so your JSON never leaves your device.

Why does the top level have to be an object?

A TOML document is a table, which maps to a JSON object. A bare array or scalar at the root has no valid TOML equivalent, so wrap it in an object first.

How are nested objects converted?

Each nested object becomes a TOML table with a dotted header, such as [owner] or [server.db]. Top-level keys are written first, then the tables follow.

What happens to arrays?

An array of primitives is written inline, like ports = [8001, 8002]. An array of objects becomes an array of tables using the [[name]] syntax.

What about null values?

TOML has no null type, so null values are written as an empty string to keep the output valid. Remove those keys first if you need them gone.

Are special characters escaped?

Yes. Strings use TOML basic-string escaping for quotes, backslashes, tabs, newlines and control characters, so the output always parses cleanly.

Related tools