YAML to JSON Converter
Convert YAML to JSON online.
About YAML to JSON
Convert YAML - config files, CI pipelines, Kubernetes manifests - into JSON you can feed to APIs and tools.
- Paste your YAML into input.yaml, or click Load Sample.
- Click Convert.
- The JSON appears in output.json; format or copy it from the editor header.
- If the YAML is invalid, the error shows the line and column to fix.
- Comments and anchors are YAML-only: comments are dropped and anchors are expanded in the JSON output.
- Unquoted values like
08,1e3or2026-09-25convert to numbers or dates - quote them to keep strings. - Going the other way? Use JSON to YAML.
Convert YAML to JSON Online
Paste YAML and get equivalent JSON: mappings become objects, sequences become arrays and scalars keep their type. Handy when a tool or API needs JSON but your config lives in YAML.
How YAML maps to JSON
- Mappings and sequences:
key: valueblocks become objects and- itemlists become arrays, in the same order. - Scalars: numbers,
true/falseandnullkeep their type; everything else becomes a string. - Comments: JSON has no comments, so
# commentsare removed. - Anchors and aliases:
&anchorand*aliasreferences are expanded, so the repeated content appears in full.
Common reasons to convert YAML to JSON
- Sending a Kubernetes manifest to an API that expects JSON
- Turning an OpenAPI or Swagger YAML file into JSON for tooling
- Debugging CI/CD configuration by viewing its real structure
- Processing YAML config with JSON tools such as
jq
YAML to JSON FAQ
What happens to comments in my YAML?
They are dropped. JSON has no comment syntax, so there is nowhere to keep them.
Can I convert a file with several documents separated by ---?
Not in one go. The converter expects a single YAML document and reports an error if it finds more. Convert each document separately.
Why did my date turn into a long timestamp?
An unquoted date such as 2026-09-25 is a timestamp in YAML, and it is written to JSON in ISO format, like "2026-09-25T00:00:00.000Z". Put the value in quotes in the YAML to keep it as plain text.
Is my data uploaded to a server?
No. The conversion runs entirely in your browser.