Convert JSON to YAML and YAML back to JSON with configurable indentation.
Both describe the same data structures (objects, arrays, strings, numbers, booleans and null). YAML uses indentation instead of braces and allows comments, which makes it popular for configuration files such as Docker Compose, Kubernetes and GitHub Actions.
No. JSON has no comment syntax, so comments are dropped. Anchors and aliases are resolved into their actual values.
If the YAML contains several documents separated by ---, the result is a JSON array with one element per document.
The most common causes are mixed tabs and spaces, inconsistent indentation and unquoted values containing ": ". The error message shows the line and column where the parser stopped.