How it works
Powered by eemeli/yaml, the de facto JS YAML parser. Both directions are lossless for spec-conforming input — every JSON document round-trips through YAML and back.
FAQ
- Why convert at all?
- YAML is friendlier for humans (Kubernetes manifests, GitHub Actions, CI configs). JSON is friendlier for machines (APIs, configs that ship in code). Most teams keep both flavours of the same data.
- Are floats / booleans / nulls preserved?
- Yes. The YAML parser respects scalar types when they're unquoted —
true,1.5,null. Quoting forces strings. - Does this handle YAML anchors / aliases?
- Yes when YAML → JSON (anchors expanded). JSON → YAML doesn't introduce anchors; output is a plain tree.
- What about YAML 1.1 vs 1.2?
- The
yamlnpm package targets 1.2 by default — meaningno/offare NOT booleans, onlytrue/falseare. Most modern tools use 1.2.
Related tools
- JSON Formatter / Minifier / Validator
Pretty-print, minify, or validate JSON. Strict spec — catches trailing commas, unquoted keys, comments at the source.
- JSON ↔ CSV
Convert between flat JSON arrays and CSV / TSV — RFC 4180 quoting via PapaParse.
- JSONPath Playground
Test JSONPath queries against a sample document — recursive descent, filters, wildcards.