Skip to content
WebKitool

JSON ↔ YAML Converter

Convert JSON to YAML or YAML back to JSON, in either direction, with indent control.

Loading tool…

Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.

How to use the json ↔ yaml converter

  1. Choose a direction: JSON → YAML or YAML → JSON.
  2. Paste your document.
  3. Copy or download the converted output.

About this tool

YAML and JSON describe the same kinds of data, which is why config files and API payloads move between them so often. YAML is easier to write and read — no braces, and it supports comments — while JSON is what most APIs and programs speak.

Conversion goes through a real YAML parser, not a text substitution, so anchors, multi-line strings and nested sequences are handled correctly. One thing cannot survive the round trip: YAML comments have no JSON equivalent, so converting YAML to JSON drops them. Converting back gives you valid YAML, not your original file's formatting.

Common uses

  • Turning an API's JSON example into a Kubernetes manifest.
  • Converting a CI config to JSON for a script to read.
  • Checking that a YAML file parses at all.

Frequently asked questions

Are my comments preserved?
No. JSON has no way to express a comment, so converting YAML to JSON loses them. Keep the original if the comments matter.
Why does my YAML fail to parse?
Almost always indentation — YAML is whitespace-sensitive and tabs are not allowed for indentation. The error message gives the line where parsing stopped.

Related tools