What this tool does
Converts JSON to YAML and YAML back to JSON, in your browser. Multi-document YAML is supported on the way in (each --- block becomes one element of a JSON array), and the parser reports errors with exact line and column positions so you can find the broken indent fast.
When you'd use it
- Translating a Helm or Kubernetes manifest written in YAML into JSON for a different tool.
- Cleaning up a config file when you forgot whether it's two-space or four-space indent.
- Pasting an OpenAPI spec out of YAML to feed it into a JSON-only validator.
- Spotting an unintended change in flow vs. block style.
How it works
Parsing uses the popular yaml library compiled into the page bundle. Output uses two-space block style for YAML and JSON.stringify(value, null, 2) for JSON. Both directions preserve nested structures, arrays, and primitives — though some edge cases (anchors and aliases, custom tags) are flattened into their resolved values.
Notes
My booleans turned into strings. YAML 1.1 treated yes, no, on, off as booleans, which famously broke Norwegian country codes (NO). YAML 1.2 narrowed booleans to true/false only. This tool follows 1.2 — quote unusual values if you mean strings.
Does it preserve comments? No. Comments are stripped during parsing because JSON has no place to put them. If preserving comments matters, edit the YAML directly rather than round-tripping through JSON.
Are anchors and aliases supported? Yes on the way in (they get resolved into duplicated nodes). Going JSON → YAML doesn't re-introduce anchors; the output is fully expanded.
Related tools
- JSON Formatter — clean up before/after conversion
- JSON Schema Validator — validate the converted JSON
- Diff Checker — compare two converted documents