YAML Tools
YAML to JSON
Parse a YAML document and export its data as formatted JSON. Use it to inspect configuration values, move data into a JSON-based tool, or catch YAML syntax mistakes with line and column feedback.
✓ Every tool runs in your browser. We do not upload your input or output.
Keyboard shortcuts
Ctrl/⌘ + Enter: process
Ctrl/⌘ + Shift + F: full screen
Esc: exit full screen
Ctrl/⌘ + F in editor: search
How to use
- Paste YAML text, upload a .yaml or .yml file, or load the sample.
- Read the JSON output as the parser processes the document.
- If an error appears, use its line and column to check indentation, quoting, or sequence markers.
- Copy or download the formatted JSON after verifying the values.
Examples
Read a service config
A nested YAML mapping becomes a JSON object with number and boolean values.
service: port: 8080 enabled: true
{
"service": {
"port": 8080,
"enabled": true
}
}Convert a list
A YAML sequence becomes a JSON array.
colors: - red - blue
{"colors":["red","blue"]}Inspecting configuration as JSON
YAML often appears in deployment and build configuration. Its compact syntax is convenient, but indentation mistakes can be hard to spot. JSON’s explicit braces and quotes provide a useful second view of the same data. This converter helps when you need to feed a YAML configuration into a JSON-based test, compare values in an API fixture, or confirm how a scalar was interpreted.
The parser recognizes common YAML mappings, sequences, booleans, numbers, nulls, and strings. Its error message includes a location when the YAML parser can identify one. Check the line before the reported position as well as the line itself; a missing colon or incorrect indent can make the next line appear invalid.
Important format differences
YAML has features that JSON cannot directly express, including comments and some custom tags. Comments are omitted because they are not part of the parsed data. Plain scalars may also have a type you did not expect. Review the generated JSON before using it in code or deployment. For a simple round trip, convert the output back with JSON to YAML and compare the meaningful values.
Frequently asked questions
Are YAML comments kept?
No. Comments are not data values and JSON has no comment syntax.
Can JSON represent every YAML feature?
No. YAML tags, aliases, custom types, and non-string mapping keys may not translate cleanly. Review output before using it.
What happens with multiple YAML documents?
This tool expects one YAML document. Split a stream with document separators into separate inputs.
Where is my file processed?
Your browser reads and parses it locally. The file contents are not uploaded to a processing server.