Paste JSON and click Convert. The output is a YAML document with correct indentation — objects as key-value pairs, arrays as dash-prefixed lists. Useful when migrating config files, preparing Kubernetes manifests, or feeding data into a YAML-native pipeline.
Free, fast, runs in your browser. No login needed.
.yaml file or copy it.The converter uses a custom recursive serializer that walks your JSON and produces YAML output following the most common formatting rules:
key: value, one per line, with nested objects indented by two spaces.- on its own line.true, null, or numeric strings.null. Numbers and booleans are written unquoted.[]; empty objects produce {}.Limitations. The output does not use YAML block scalars for multi-line strings — a string containing a newline character will be serialized with the escaped
inside double quotes rather than as a literal block. YAML anchors, aliases, and tags are not generated. If your downstream tooling requires specific YAML styles, review the output and adjust manually.
Common use cases: converting a JSON config to YAML format for a tool like Docker Compose or Ansible; preparing data for import into a YAML-based system; understanding the YAML equivalent of a JSON structure.
Yes. The output follows standard YAML 1.1/1.2 rules and can be parsed by any compliant YAML parser. Strings are double-quoted to prevent ambiguity.
The serializer always wraps string values in double quotes to avoid YAML's ambiguous plain scalars — for example, "true" and "null" are YAML keywords and would be parsed as boolean/null if left unquoted. Double-quoting is always safe.
Multi-line strings are serialized with escaped \n inside double quotes rather than as YAML block scalars (| or >). The value is correct but may be less readable for long text blocks.
Yes. Use the YAML to JSON tool on this site. That direction uses the js-yaml library for full YAML parsing support.
No. The conversion runs entirely in your browser.