YAML to JSON
Convert YAML config files to JSON. Nothing is uploaded.
Drop YAML files here
Converted on your device. Files are never uploaded.
Up to 20 files at a time.
YAML is pleasant to write by hand, which is why so many config files, CI pipelines and Kubernetes manifests use it, but plenty of tools and APIs read only JSON. FormatJet parses your YAML with the yaml library and writes the equivalent JSON. It runs in your browser, so configs and any secrets in them stay on your device.
About the formats
YAMLYAML file
YAML is a readable text format for settings and data, built on indentation instead of brackets. Docker, Kubernetes and CI services use it for configuration.
JSONJSON file
JSON is the text format web APIs and apps use to exchange data: objects, lists, text, numbers and true or false values, nested as deep as needed.
Converted with Data converters (Papa Parse, yaml, fast-xml-parser), Data converters on Workers.
Questions
What happens to comments in my YAML?
They’re dropped. JSON has no comments, so there’s nowhere to put them; keep the YAML if the notes matter.
My file has several documents separated by ---. What do I get?
One JSON list, with each YAML document as an entry in the order they appear in the file.
Are anchors and aliases kept?
They’re expanded. Wherever the YAML reuses an anchored value through an alias, the JSON contains a full copy of it, since JSON has no way to refer back to one.
Can I get minified JSON?
Yes. Turn off “Indent the JSON” in Options and the whole result is written on one line, handy for pasting into a request body or an environment variable.
Does it accept .yml files?
Yes. The page goes by what’s inside the file, not its extension, so YAML saved as .yml, .yaml or .txt is read the same way, with the yaml library.
YAML to JSON with the API
The conversion API opens later this year.
curl https://api.formatjet.com/v1/convert?to=json \
-H "Authorization: Bearer fj_test_…" \
-F file=@input.yaml -o output.json