What is JSON / YAML Converter?
JSON and YAML Converter targets common configuration and data exchange using a restricted YAML 1.2 core model. Custom tags, merge keys, duplicate keys, and excessive alias expansion are rejected, with limits on depth and node count. Comments, anchors, and scalar styling that cannot survive conversion are disclosed. Common workflows include the following. Convert between a JSON API example and YAML configuration. Check whether YAML can be represented as ordinary JSON data. Generate basic YAML for documentation or deployment files. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.
When to use it
- Convert between a JSON API example and YAML configuration.
- Check whether YAML can be represented as ordinary JSON data.
- Generate basic YAML for documentation or deployment files.
How to use it
- Paste JSON or safe YAML.
- Choose the conversion direction.
- Review the lossy-mapping note and copy or swap the result.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
- Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.
Runnable examples
The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.
Example 1
{"project":"JSONLane","release":{"branch":"develop","tools":20},"checks":["typecheck","lint","build"]}Example 2
project: JSONLane
locales:
- zh-cn
- en
release:
branch: develop
tools: 20
features:
darkMode: true
localOnly: trueInput rules
- JSON input must follow strict JSON syntax.
- YAML custom tags, merge keys, and duplicate keys are not allowed.
- Excessive depth, alias expansion, and unsafe integers are rejected.
- Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
- YAML comments, anchors, aliases, tags, and scalar styles are not preserved.
Output rules
- JSON-to-YAML emits basic scalars, objects, and arrays.
- YAML-to-JSON does not retain comments, anchors, tags, or styling.
- Structures without a reliable mapping cause an error or explicit warning.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- Custom tags, duplicate keys, merge keys, unsafe integers, and excessive alias expansion are rejected.
Limitations and cautions
- YAML comments, anchors, aliases, tags, and scalar styles are not preserved.
- Custom tags, duplicate keys, merge keys, unsafe integers, and excessive alias expansion are rejected.
- Depth is limited to 100 and expanded nodes to 50,000.
How your data is handled
The parser works only in the browser, does not load remote YAML references, and does not retain configuration.