⚡
usefultools.dev
J→T

JSON to TOML Converter

NOUVEAU

Convert a JSON object to TOML in your browser, with clear messages for nulls, top-level arrays and syntax errors.

Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.

Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.

Options

TOML limits: the top level must be an object (not an array or a bare value) and TOML has no null — a null is reported with its path, or dropped if you choose “Omit them”. Arrays that mix types are written as inline arrays, which TOML 1.0 allows. Whole numbers such as 1.0 are written as integers because JSON does not tell them apart.

⚡

Exemples rapides

Des entrées typiques et les résultats produits par cet outil.

Keys
{"name":"demo","port":8080}
name = "demo" port = 8080
Table
{"db":{"host":"localhost"}}
[db] host = "localhost"
Array
{"tags":["a","b"]}
tags = [ "a", "b" ]
Array of tables
{"servers":[{"name":"alpha"},{"name":"beta"}]}
[[servers]] name = "alpha" [[servers]] name = "beta"
📖

Présentation

JSON to TOML Converter turns a JSON object into a TOML file. Nested objects become [tables], arrays of objects become [[array tables]], and plain values are written with TOML quoting and number rules.

The two formats are not equal in what they can express. TOML needs an object at the top level and has no null, so the tool tells you exactly where a null sits, or drops it when you choose to omit nulls. If the JSON itself is invalid, the message names the problem and points to the line and column.

Conversion happens in your browser; the JSON you paste or open is never uploaded.

Pourquoi utiliser cet outil ?

  • Moves API or app settings into Cargo.toml-style files without hand editing
  • Null and top-level array problems are explained with the path, not a stack trace
  • JSON syntax errors show line, column and the broken line
  • Runs locally, so private settings stay on your device
⭐

Fonctionnalités

📄

Paste or upload

Paste JSON or open a .json file up to 2 MB.

🧱

Tables and arrays

Objects become [tables]; arrays of objects become [[array tables]].

🚫

Null option

Report each null with its path, or leave null keys and items out.

📍

Strict JSON errors

Trailing commas, single quotes and other slips are located precisely.

⇄

Swap direction

Pass the TOML to the TOML → JSON tool to check the round trip.

⬇️

Copy or download

Copy the TOML or save it as a .toml file.

🛠️

Mode d'emploi

1

Add your JSON

Paste an object, open a file, or press Load sample.

2

Pick null handling

Leave it on "Report an error" or choose "Omit them".

3

Check the output

The TOML updates as you type; amber notes list anything that was changed.

4

Copy or download

Use Copy, Download .toml, or Swap to go back to JSON.

🤔

Questions fréquentes