Nifty Dev Tools
  1. Home
  2. JSON ↔ YAML
Format

JSON ↔ YAML Converter

We never upload what you paste ✨

Paste JSON or YAML and get the other one, ready to copy or download.

JSON
YAML

Your YAML will show up here as you type.

How to use it

  1. Pick JSON → YAML or YAML → JSON and paste. The result updates as you type.
  2. Choose 2 or 4 spaces of indent. Swap sends the result back to convert the other way.
  3. Copy or Download the result (converted.yaml / converted.json).

Example

This YAML uses an anchor (&defaults) and a merge key (<<):

defaults: &defaults
  region: eu-west
  replicas: 2
web:
  <<: *defaults
  replicas: 3

becomes this JSON (the merge is expanded, replicas overridden):

{
  "defaults": { "region": "eu-west", "replicas": 2 },
  "web": { "region": "eu-west", "replicas": 3 }
}

Safe YAML output

YAML 1.1 readers (PyYAML and many CI tools) read yes, on, n or 2026-11-18 as a boolean or a date. When converting to YAML, text values like these are quoted ('yes'), so every YAML reader gets back exactly the JSON you started with.

Good to know

  • YAML is read with the YAML 1.2 core schema: yes, no and dates stay text, true / false / null and numbers are values. Anchors, aliases and merge keys are expanded.
  • JSON has no comments, so comments in YAML are left out (we tell you when that happens).
  • One YAML document at a time: a file with --- between documents is explained instead of silently cut.

FAQ

Why are some values quoted in the YAML?

Quotes keep text as text for every YAML reader. Without them, answer: yes would become true in YAML 1.1 tools.

Is my data uploaded?

No. Conversion happens in your browser with js-yaml, served from this site. See the privacy page.