← All tools

YAML to JSON

Convert one or multiple YAML documents to pretty or compact JSON locally.

yaml-to-jsonLOCAL WORKSPACE

Enabling local controls…

One YAML document retains its value; multiple documents become an ordered JSON array. Maximum100 documents/10000 nodes/64 levels. Any invalid document rejects the entire stream.

Change the target format without pasting again. Up to100,000 UTF-16 units /256KiB input and1MiB output. Worker startup10s /processing1s; data stays in this page's memory.

Conversion can lose comments, aliases, element order or native date types. Numbers that cannot retain their precision are rejected; quote them as strings. TOML requires a top-level object and cannot represent null. XML needs one root element, @ attributes and #text. Leaf text whitespace is retained; mixed content whose ordering cannot be preserved and DTD/entity declarations are rejected.

Result

Preview: first 32,000 characters. Copy, download and expanded text retain all content. Select complete text if copying fails.

Expand complete selectable text

How to use this tool

Paste or explicitly open local YAML; one document retains its value and a multi-document stream becomes an ordered JSON array.

When not to use it

YAML comments and aliases do not survive conversion; review configuration semantics before use.