DataFmt

YAML to JSON

Turn YAML configuration into JSON that scripts and services can consume directly.

Drag & drop a file here, or click to upload
Options:

About this tool

Configuration is often written in YAML but consumed by scripts that prefer JSON. Translating by hand is error-prone, particularly when anchors (`&`) and aliases (`*`) are involved.

Powered by js-yaml, the converter correctly handles anchors, merge keys (`<<`) and multi-document files (the first document is returned), and emits strictly-valid JSON.

How to use

  1. Paste YAML text into the input.
  2. Click "Convert".
  3. The right-hand panel shows formatted JSON.
  4. Toggle pretty-print on or off as needed.

Use cases

Notes

Frequently Asked Questions

Do you support YAML 1.2?
Yes, via the CORE_SCHEMA default.
Will `<<: *ref` merge keys work?
Yes. Merge keys are expanded into the resulting object.
Is this safe to use on untrusted input?
We disable unsafe constructors (such as `!!js/function`) so YAML cannot execute arbitrary code.