uuutil ← all tools

YAML ⇄ JSON

Paste YAML or JSON and convert in either direction with a clear direction control. JSON output is pretty-printed with your choice of indent (2, 4 or tab); YAML output uses sane defaults — block style, quotes only where the syntax requires them, no anchors emitted. Parsing is the bundled js-yaml in safe mode: only standard YAML types, no custom tags, nothing ever executes. Anchors and aliases in your input are resolved into plain values, and multi-document input (--- separators) converts to a JSON array with a note. Parse errors name the line and column where the parser reports them.

Privacy ledger

Data acquired None.
Libraries used Lit 3 and js-yaml 4.1.0 (MIT) — both bundled into the tool file itself.
Data stored None.
Data transmitted None.

Use it on your own page

Download the tool as a single self-contained HTML file: readable source with the Lit library included, zero network requests — it works opened straight from your disk, and you can customize everything.

Prefer the hosted widget? One script tag embeds it and stays up to date:

<script type="module" src="https://uuutil.com/tools/yaml-json.js"></script>
<uu-yaml-json lang="en"></uu-yaml-json>

Source license: MIT — free to use, modify and redistribute; keep the license notice in copies.