Useful Hacks

YAML to JSON

Convert YAML to JSON — including anchors, merge keys and multi-document files.

Processed locally in your browser. Nothing you enter is uploaded or stored.
  • Reports YAML syntax errors with a location instead of failing silently.
  • Resolves the `<<: *anchor` merge-key idiom into a genuinely merged object, not a literal `<<` key.
  • Handles `---`-separated multi-document YAML (standard in Kubernetes manifests) by combining documents into a JSON array instead of failing.
  • Outputs formatted JSON you can pass straight to code or an API.
  • Runs in your browser; config isn't uploaded.

Why this is private

  • Processed locally in your browser. Nothing you enter is uploaded or stored.
  • Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
  • Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.

Overview

Converts YAML to JSON — useful when you need to consume a YAML config file from code that expects JSON. Resolves anchors, aliases and merge keys (`<<: *anchor`), and handles multi-document files (`---`-separated), both common in Docker Compose, CI and Kubernetes YAML.

How to use it

  1. 1Paste YAML.
  2. 2The JSON output updates automatically.

Frequently asked questions

What people use it for

Consume a YAML config from JSON-only codeConvert a `.yml` file into JSON your app can `JSON.parse`.
Convert a Docker Compose file that uses merge keys`<<: *defaults` blocks are resolved into the actual merged fields, not left as a literal key.
Convert a multi-document Kubernetes manifestA file with several `---`-separated resources becomes one JSON array.
Diff two YAML files reliablyConvert both to JSON so indentation and anchor style don't muddy the diff.

Related guides

Related tools

All developer tools

Ready to use YAML to JSON?

YAML to JSON

Search tools

Search for any tool by name, category or keyword