HelperCrate

YAML ↔ JSON Converter

Convert YAML to JSON and back. Parser loads only when needed.

Your files never leave your device. Everything runs in your browser.

What YAML ↔ JSON Converter does

YAML ↔ JSON Converter moves configuration data between YAML and JSON in both directions using the js-yaml library. YAML is common for Docker Compose, Kubernetes, GitHub Actions and CI configuration, while JSON is the natural format for APIs and JavaScript, so the converter is a quick bridge between the two.

The YAML parser uses the safe schema: it resolves only standard types and never executes code or constructs custom classes. Anchors and aliases are expanded into their values, comments are dropped because neither JSON nor a re-dump of YAML can carry them, and a multi-document YAML stream is rejected with a clear message because JSON has no equivalent for it.

The library is loaded from the jsDelivr CDN the first time you convert, so the first conversion needs a network connection. Your data itself is never uploaded — only the parser script is downloaded.

How to use YAML ↔ JSON Converter

  1. Choose the direction: YAML → JSON or JSON → YAML.
  2. Paste the document into the input box.
  3. Pick the indent width — two or four spaces — for the output.
  4. Click Convert and read the result in the output box.
  5. Use Copy or Download to save the converted document.

Features

Tips and common mistakes

Frequently asked questions

Is my configuration data uploaded?

No. The conversion runs in your browser. The only network request is the one-time download of the js-yaml parser from jsDelivr, which contains no user data.

Why did yes become a string instead of a boolean?

The converter uses the YAML 1.2 style safe schema, where only true and false are booleans. If you need a boolean, write true or false; if you need the literal word yes, quote it or accept it as the string it already is.

Are YAML comments preserved?

No. JSON has no comment syntax and a YAML re-dump would not keep them reliably, so comments are discarded. Copy important notes into your documentation or commit the commented YAML separately.

Can I convert multiple YAML documents at once?

No. JSON represents a single document, so a multi-document stream is rejected. Remove the --- separators or convert each document separately.

What happens to anchors and aliases?

They are resolved during parsing, so the JSON output contains the expanded values and no anchor references. Converting back to YAML will not recreate the anchors.

Does it work offline?

After the page has loaded the parser once, the browser may keep it cached, but the first conversion on a fresh visit needs internet access to fetch js-yaml from the CDN.

Your YAML and JSON stay in the browser; only the parser script is downloaded from the CDN.