YAML to JSON Converter
Paste YAML (from Kubernetes, Docker Compose, GitHub Actions or config files) and get valid JSON immediately.
Runs in your browser. Your files are never uploaded.
Loading YAML to JSON Converter…
How to use YAML to JSON Converter
- Paste YAML or upload a .yaml/.yml file.
- Choose the indent size.
- Copy or download the JSON.
YAML and JSON compared
YAML is a superset of JSON in spirit: every JSON document can be expressed in YAML, but YAML adds comments, anchors, multi-line strings and a cleaner syntax. That is why configuration tools such as Kubernetes, Docker Compose, Ansible and CI systems prefer it, while web APIs prefer the stricter JSON.
Typical conversions
- Feed a YAML config to a script or API that expects JSON.
- Check what a YAML file really parses to, including types.
- Validate YAML syntax before committing.
- Migrate settings from YAML into a JSON-only system.
Gotchas
YAML guesses types: unquoted yes/no may become booleans, 0123 may become a number, and dates may be parsed as dates. If you need a literal string, put it in quotes. Duplicate keys and tab indentation are errors. Always review the JSON output for values that were typed differently than you intended.
Reading the converted result
Check the JSON for values that YAML interpreted as other types. In YAML 1.1 parsers, words such as yes, no, on and off can become booleans, and a value like 1e3 can become a number. This converter follows the YAML 1.2 core schema used by js-yaml, where only true and false are booleans.
Multi-line strings written with | or > in YAML become single JSON strings with newline characters. Anchors and aliases (&name and *name) are expanded, so shared sections appear repeated in the JSON output.
Why use this yaml to json converter tool
- Parses real-world YAML. Anchors, lists, nested maps and multi-line strings.
- Clear errors. Tells you the line of a syntax problem.
- Private. Nothing leaves your browser.
Frequently asked questions
What is the difference between YAML and JSON?
Both store structured data. JSON uses braces and quotes and is strict; YAML uses indentation and is easier to read and write by hand, and allows comments.
Are YAML comments kept?
No. JSON has no comments, so they are dropped during conversion.
Why do I get an indentation error?
YAML forbids tabs for indentation and requires consistent spaces. Replace tabs with spaces and align nested items.
More free tools
JSON Formatter
Format, validate, beautify and minify JSON instantly. Shows the exact line and column of any error. Free and runs in your browser.
Open toolJSON to CSV
Convert a JSON array to CSV in your browser. Flattens nested objects, picks delimiters and downloads a ready .csv for Excel or Sheets.
Open toolCSV to JSON
Convert CSV to JSON in your browser. Auto-detects delimiter, uses the header row as keys, and can convert numbers and booleans.
Open tool