YAML to JSON Converter
100% PrivateData & JSON ToolsConvert YAML configuration into strict JSON, and convert JSON back to YAML.
Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.
- 1Choose the direction: YAML to JSON or JSON to YAML.
- 2Paste your document into the input box.
- 3Press Convert.
- 4Copy the result or download it with the matching file extension.
Worked example
Config YAML to JSON
Input: name: Ana age: 31 Output: { "name": "Ana", "age": 31 }
- YAML features with no JSON equivalent, such as anchors and custom tags, are resolved or rejected by the parser; anchors are expanded into plain values in the JSON output.
- YAML timestamps become date-time strings in JSON. Keys that are not strings in YAML are converted following the parser's rules.
- Duplicate keys in a YAML mapping are an error in strict parsing and will be reported rather than silently overwritten.
Yes. The direction selector switches between YAML to JSON and JSON to YAML; the download filename changes to match.
About this tool
The YAML to JSON Converter works in both directions: turn YAML config into strict JSON for tools that need it, or turn JSON into readable YAML for config files and documentation. Both directions use the js-yaml parser, the standard JavaScript YAML implementation.
Related tools
TOML to JSON ConverterConvert TOML configuration files into JSON with a careful browser-side parserData & JSON ToolsOpenJSON Formatter and ValidatorFormat JSON with your choice of indentation, validate it and explore its structureData & JSON ToolsOpenJSON to XML ConverterConvert JSON into well-formed XML using a documented, deterministic mappingData & JSON ToolsOpenXML to JSON ConverterParse XML and convert it into JSON you can use in code and toolsData & JSON ToolsOpen
Advertisement
Part of Ovatly's free tools in Data & JSON Tools.