JSON ↔ YAML Converter
Choose JSON → YAML or YAML → JSON, paste into Input, and click Convert. Successful runs fill the Output box and enable Copy output. Errors clear Output and show the message in the status line.
Updated 2026-08-04 · developer
About this tool
JSON → YAML parses with JSON.parse then dumps via js-yaml with unlimited line width and noRefs. YAML → JSON loads with js-yaml then pretty-prints with two-space JSON. Direction is a select above the Input textarea so you never mix the two paths by accident.
How to use
- Pick a direction: Select JSON → YAML or YAML → JSON in the Direction control.
- Enter input: Paste JSON or YAML into the Input textarea to match the direction you chose.
- Convert: Click Convert to fill Output, or read the Error status if parsing fails.
- Copy the output: When Output appears, click Copy output to place the result on the clipboard.
Common use cases
- Turn a JSON API sample into YAML for Kubernetes or CI config drafts.
- Expand a YAML manifest into indented JSON for an editor that prefers braces.
- Round-trip a small config to confirm keys and arrays survive both formats.
Tips
- Set Direction before Convert; switching after a run does not auto-convert again.
- Use Copy output after a success status—empty Output means the last Convert failed.
FAQ
Which library builds the YAML?
Conversion uses js-yaml dump and load in the browser with lineWidth disabled and noRefs on dump.
Why is Output empty after Convert?
A parse or dump error cleared Output; the status line shows the Error details.
Does Copy output always show?
No. The copy button appears only after a successful conversion produces Output.
Is my config uploaded?
No. JSON.parse, js-yaml, and clipboard copy all stay in your browser.