Skip to content
Shrake DevTools
  • JSON FormatterData & Format
  • JSON ValidatorData & Format
  • JSON MinifierData & Format
  • JSON ↔ YAML ConverterData & Format
  • Base64 Encoder / DecoderData & Format
  • URL Encoder / DecoderData & Format
  • UUID GeneratorData & Format
  • Unix Timestamp ConverterData & Format
↑ ↓ to navigate↵ to openEsc to close

JSON ↔ YAML Converter

Convert JSON to YAML and YAML to JSON without losing large numbers, with anchors, merge keys and safe quoting.

Runs locally in your browser. Your input is not uploaded.Free, no sign-up

JSON

YAML

How to use the JSON ↔ YAML converter

  1. Choose JSON → YAML or YAML → JSON.
  2. Paste your input, or click Sample for a Kubernetes Deployment (JSON) or a Docker Compose file (YAML).
  3. The converted result appears instantly. Errors show the line and column.
  4. Copy or Download the result, or Swap to convert it back.

What makes this converter safe

  • No lost digits. Large integers like 12345678901234567890 stay exact in both directions, and JSON numbers such as 19.90 keep their spelling in YAML.
  • No "Norway problem". Older YAML 1.1 parsers (used by SnakeYAML in Spring Boot, PyYAML and many Kubernetes tools) read NO, yes, off and ~ as booleans or null. Strings like these are quoted, so "NO" stays the country code for Norway.
  • Real-world YAML. Anchors, aliases and << merge keys (common in Docker Compose and CI files) are resolved. Multiple documents separated by --- become a JSON array.
  • Safe with untrusted input. Alias bombs ("billion laughs") are detected and stopped.

Frequently asked questions

Is my data uploaded?

No. Conversion happens entirely in your browser. Configuration files and secrets never leave your machine.

What happens to YAML comments?

JSON has no comments, so they're removed when converting YAML to JSON. You'll see a note when that happens.

Why are some strings quoted in the YAML output?

Only where needed: when a string would otherwise be read as a number, boolean or null, or contains characters with a special meaning in YAML, such as : or #.

Is YAML a superset of JSON?

YAML 1.2 is, so any JSON document is valid YAML. The reverse isn't true: YAML adds comments, anchors, multiple documents and more types, which is why YAML → JSON needs a real converter.