YAML↔JSON Converter

Convert either way. Quoting is handled, so yes, off and 1.0.0 survive the round trip with their types intact.

In-browser & private
Advertisement

Anchors, aliases and multi-document files are refused by name rather than half-parsed — wrong output is worse than a clear refusal.

YAML
JSON
Keys Depth Size 0 B Ready

What the converter is careful about

  • Types are preserved in both directions. This reader follows YAML 1.2, where only true and false are booleans — so off stays the string "off". But SnakeYAML, which Spring Boot uses, follows YAML 1.1 and reads yes, no, on and off as booleans. Those values are therefore always quoted on the way out, so a password of off cannot come back as false in your application.
  • Version-like strings stay strings. 1.0.0 is not a number and is left alone; 1.0 is, and is converted.
  • Multi-line strings become block scalars (|-) rather than one long line full of \n escapes.
  • Empty collections are written in flow style. key: [] and key: {}, because a bare key: reads back as null and that is a different document.

More free tools