loot.tools

JSON Converter

Convert JSON to YAML, XML, or TOML, and back the other way, all in your browser. Pick a format and direction, paste your data, and copy clean output. Handles nested objects, arrays, attributes, and the standard scalar types, with options for YAML indentation and the XML root element.

Convert JSON to and from YAML, XML, and TOML, right in your browser. Pick a format and direction, paste your data, and copy the result. Indentation, nested objects, arrays, and all the standard scalar types carry over both ways.

JSON Input
YAML Output

How it works

Pick a target format (YAML, XML, or TOML) and a direction, paste your data, and the converted output appears as you type. Nothing leaves your browser. The converter preserves your data structure including nested objects, arrays, nulls, booleans, and numbers, and you can feed an output straight back in by flipping the direction.

When you'd use this

  • Switching a project's config from JSON to YAML for a CI pipeline or Kubernetes
  • Porting data to an XML API or reading an XML payload back into JSON
  • Moving settings into a Cargo.toml or pyproject.toml
  • Translating between formats when different tools in your pipeline expect different inputs

Format notes

YAML round-trips losslessly and lets you set the indent. For XML, object keys become elements, arrays repeat the element, keys starting with @ become attributes, and a #text key holds element text, with options for the root name and the XML declaration. TOML turns nested objects into [table] headers and arrays of objects into [[array of tables]], but since TOML has no null type, null values are dropped on the way out.