YAML ⇄ JSON Converter

Turn YAML into pretty-printed JSON, or JSON into clean YAML — with helpful line-and-column error messages when something doesn't parse.

🔒 100% private — nothing is uploaded

How it works

YAML and JSON describe the same shapes of data — objects, arrays, strings, numbers. This tool parses one format into an in-memory value, then serialises it into the other. It all happens in your browser with the open-source js-yaml library.

1

Paste your data

Drop in YAML or JSON. Pick the direction with the toggle — the input label updates to match.

2

Convert instantly

YAML → JSON returns pretty, indented JSON. JSON → YAML returns clean block-style YAML. Errors show the exact line and column.

3

Copy or download

Copy the result to your clipboard, or download it as a .json / .yaml file. Use Swap to round-trip.

🔒

Private by design. Every conversion runs entirely in your browser. Your YAML and JSON are never sent to a server — we never see them.

Frequently Asked Questions

Can I convert in both directions?
Yes. Use the toggle to switch between YAML → JSON and JSON → YAML. The input label updates to match, and the result converts as you type.
Can I control the indentation?
Yes. Choose 2 spaces, 4 spaces or tabs for the output. YAML output always uses spaces since the format doesn't allow tab indentation.
What happens if my data has a mistake?
You get a clear parse error pointing to the exact line and column, so you can jump straight to the problem instead of hunting for it.
What is the Swap button for?
Swap feeds the result back in as the new input and flips the direction — handy for round-tripping data or checking that a conversion comes back the same.
Can I save the converted result?
Yes. Copy it to your clipboard, or download it as a .json or .yaml file depending on the direction.
Is my data uploaded anywhere?
No. Every conversion runs entirely in your browser — your YAML and JSON are never sent to a server and nothing is uploaded or stored.