Convert JSON to YAML and YAML to JSON. Direction is detected automatically, merge keys are expanded, and tabs are fixed in one click.
Paste either format and the direction is worked out from what you gave it. JSON is also valid YAML, so if you need a specific direction for something ambiguous, set it explicitly.
YAML allows only spaces for indentation, never tabs — and most editors insert tabs unless told otherwise. Paste a file with tab indentation and you will be offered a one-click fix rather than a parser message about deficient indentation.
A merge key copies another mapping's keys into this one, so shared configuration is written once. It is everywhere in docker-compose and GitLab CI files.
JSON has nothing equivalent, so the merge is expanded during conversion. A key you wrote explicitly always beats the merged value, which is what the merge means.
A line containing only --- starts a new YAML document, and a Kubernetes manifest
often holds a dozen. JSON holds exactly one value, so you will be offered them as an array.
Going from JSON to YAML, numbers are copied exactly as written. Coming back the other way they pass through JavaScript, where integers above 9,007,199,254,740,991 lose their last digits. When that happens you get told rather than left to discover it.
Comments, anchors and aliases, multiple documents, and unquoted strings. Comments are dropped because JSON cannot hold them. Anchors are expanded to the values they point at, unless one refers to itself, which would never terminate.