JSON & Data
YAML / JSON Converter
Convert YAML to JSON and JSON to YAML locally, with syntax checks, formatting, and clear parser errors.
Processed locally. Nothing from the editor is stored.
How to use YAML / JSON
Conversion uses a JSON-compatible YAML schema. true, false, and null are booleans and null. Words such as yes stay strings. Timestamps such as 2020-01-01 stay strings so the JSON result does not gain a hidden Date type.
- Choose YAML to JSON or JSON to YAML.
- Paste a single document and choose Convert. Use Format to re-indent the same format.
- Copy or download the output. A parser error replaces the output.
Examples
Turn a config into JSON
name: Ada\nports:\n - 80 becomes a JSON object with a ports array.
Turn a package manifest excerpt into YAML
A JSON object with nested scripts becomes a block-style YAML document with two-space indentation.
Questions
Why did yes not become true?
The converter uses JSON-compatible types. Quote nothing and write true when you want a boolean.
Are duplicate keys allowed?
Duplicate keys override earlier values, matching JSON.parse. The error text tells you when the document itself is invalid.