YAML to JSON Converter
Convert YAML to JSON and JSON to YAML in your browser, both ways as you type.
Get a useful result from YAML to JSON Converter.
Paste YAML to get formatted JSON, or paste JSON to get clean YAML; the other side updates as you type. Use it for Kubernetes manifests, Docker Compose files, GitHub Actions workflows, OpenAPI specs and app config. Parsing follows YAML 1.2 and happens entirely in your browser, so private configuration never leaves your device.
When this tool helps
- Turn a Kubernetes or Docker Compose YAML file into JSON for an API, script or test fixture.
- Convert a JSON API response or package config into readable YAML.
- Find the exact line and column of a YAML indentation or syntax error.
- Check how YAML values such as yes, 1.0, null or dates are actually typed.
YAML 1.2 types, not YAML 1.1 surprises
The converter uses the YAML 1.2 core schema. Only true and false are booleans, so yes, no, on and off stay strings, which avoids the well-known “Norway problem” where NO became false under YAML 1.1. Values like 2026-12-04 stay strings rather than turning into dates. If a value must be text, quote it in YAML: "1.0" stays a string, while 1.0 becomes the number 1.
What JSON can’t keep
JSON has no comments, anchors or multiple documents. Comments are removed, anchors and aliases (& and *) are expanded into full copies, and a file with several documents separated by --- becomes a JSON array with one item per document. .inf and .nan have no JSON equivalent and become null; the tool tells you when that happens. Duplicate keys in one mapping are reported as an error instead of silently keeping one value.
Large IDs and conversion limits
Integer IDs outside JavaScript’s safe range become quoted JSON strings when converting YAML, with a notice, so no digits are silently lost. In JSON input, quote large integer IDs yourself before conversion; unsafe numeric values are rejected. Decimal values use JavaScript number precision. Mapping keys must be strings; unsupported YAML tags and complex keys are rejected rather than silently reinterpreted. Input and generated output are limited to 1,000,000 characters. Fix a syntax error before using the converted output; the outdated result is cleared.
Private by design
Config files often contain hostnames, internal URLs or secrets. This converter runs entirely in your browser with the open-source yaml library; nothing you paste is sent to ZemoPro. Even so, remove real passwords and tokens before pasting configuration into any website.
Example input
name: zemopro-site
version: 2
enabled: true
ports:
- 80
- 443Expected output
{
"name": "zemopro-site",
"version": 2,
"enabled": true,
"ports": [
80,
443
]
}Numbers and true/false stay typed in JSON; text such as zemopro-site becomes a string. YAML comments are dropped because JSON has no comments.
How YAML values become JSON
Results from this converter (YAML 1.2 core schema).
| YAML | JSON | Why |
|---|---|---|
enabled: true | "enabled": true | Boolean |
answer: yes | "answer": "yes" | yes/no are strings in YAML 1.2 |
country: NO | "country": "NO" | No “Norway problem” |
version: 1.0 | "version": 1 | A number; quote it to keep 1.0 |
version: "1.0" | "version": "1.0" | Quoted, so a string |
empty: ~ | "empty": null | ~ and null are null |
date: 2026-12-04 | "date": "2026-12-04" | Dates stay strings |
port: 0x1F | "port": 31 | Hexadecimal integer |
Questions about this task
Is my YAML uploaded?
No. Conversion runs in your browser; the text you paste isn’t sent to ZemoPro’s server.
Why did my YAML comments disappear?
JSON has no comment syntax, so comments can’t be carried over. Keep the YAML file as your source if you need them.
Can it convert a file with several documents?
Yes. Documents separated by --- become a JSON array, in order.
Why is yes a string and not true?
In YAML 1.2, only true and false are booleans. Older YAML 1.1 parsers treated yes, no, on and off as booleans; this converter follows 1.2.
How do I convert JSON to YAML?
Paste the JSON into the right-hand box. The YAML appears on the left, ready to copy or download as a .yaml file.
How to use YAML to JSON Converter
Paste YAML on the left to get JSON on the right, or paste JSON on the right to get YAML. Errors show the line and column. Copy or download either side.
Good to know
Uses YAML 1.2 (core schema) and runs on your device; nothing is uploaded. Comments, anchors and key order styling are not kept in JSON. Several YAML documents become a JSON array; .inf and .nan become null. Inputs up to 1,000,000 characters.
A few helpful answers
Is this tool free?
Yes. All features on this page are free and require no account.
Where is my data processed?
In your browser. Tool input and selected images are not sent to our servers. Clear the page or close the tab to discard your input.
What should I check before using the result?
Uses YAML 1.2 (core schema) and runs on your device; nothing is uploaded. Comments, anchors and key order styling are not kept in JSON. Several YAML documents become a JSON array; .inf and .nan become null. Inputs up to 1,000,000 characters.
