Skip to main content

Config Format Converter

Convert config files between JSON, JSONC, YAML and TOML and see exactly what changes.

YAML Input

0 of 5,242,880 bytes

Options

Fidelity:Best effort

Indentation
Advanced

JSON Output

Paste a YAML config, open a file or load an example.

Runs locally in your browser. Nothing is uploaded; only option choices are remembered.

How to use

  1. 1.Choose the source format and the target format, then paste your config, open a file or load an example.
  2. 2.Small inputs convert as you type; inputs over about 100 KB convert when you select Convert.
  3. 3.Review the Diagnostics list and select an entry to jump to its line.
  4. 4.Adjust indentation, string quotes, sorting and TOML null handling in Options.
  5. 5.Swap moves the output into the input and reverses the formats.

Config Format Converter

Every source is parsed into one neutral value tree, then written in the target format. Integers keep every digit, so values beyond the JavaScript safe range are never rounded; TOML output checks the 64-bit integer range. YAML is read with the YAML 1.2 core schema by default, or with YAML 1.1 rules where yes and off are booleans. Aliases and merge keys are expanded, custom tags fall back to their plain values, and TOML dates and times keep their written form. The diagnostics list reports each comment, anchor, tag, merge key, datetime or null that the conversion changes, so a swap never pretends to be lossless.

Formats and type mapping

JSON is strict RFC 8259 JSON. JSONC also accepts comments and trailing commas, as in tsconfig.json and VS Code settings. YAML supports block and flow style, anchors and aliases, merge keys and multi-document streams. TOML follows TOML 1.0 and 1.1, including datetimes and arrays of tables. Strings, booleans, integers, floats, lists and objects map one to one. TOML has no null and needs a table at the top level, JSON has no date type, and YAML timestamps exist only in YAML 1.1, so those cases are reported instead of silently changed.

Fidelity labels

Lossless means the data and its form survive. Structurally lossless means every value survives but formatting and comments do not. Best effort means the target cannot represent something in the source, for example comments, anchors, custom tags, datetimes in JSON or null in TOML. The label next to Target format starts with the expected class for the pair and updates after each conversion based on what the input actually contains.

Privacy

Runs locally in your browser. Config files are never uploaded, logged or stored; only your option choices are remembered on this device.

Frequently asked questions
Are comments kept when I convert?
No. Comments from YAML, TOML and JSONC are removed, and the diagnostics list says how many were dropped. Converting YAML to YAML or TOML to TOML reformats the file and also removes comments.
What happens to YAML anchors and merge keys?
Aliases are expanded into copies and merge keys are resolved, with explicit keys winning over merged ones. Both are reported. Alias expansion is capped so alias bombs stop with an error instead of freezing the page.
How are null values and big integers handled in TOML?
TOML has no null, so a null is an error by default or can be omitted with a warning per path. Integers are kept digit for digit; values outside the TOML 64-bit range are reported as errors.
Does YAML yes or on become a boolean?
Only with YAML 1.1 selected. The default YAML 1.2 core schema reads yes, no, on and off as strings. YAML output always quotes such strings so YAML 1.1 readers keep them as text.

CodingTool is officially live on