JSON to YAML converter
Convert JSON into clean, valid YAML for configs, Kubernetes manifests or CI files. Strings are quoted only when YAML would misread them. Runs in your browser.
Worked example
A small service config. "yes" and "1.10" are strings in the JSON, so they are quoted in the YAML; otherwise YAML would read them as true and 1.1.
{"name":"web","replicas":3,"enabled":"yes","version":"1.10","ports":[80,443],"env":{"MODE":"prod","DEBUG":false}}name: web replicas: 3 enabled: "yes" version: "1.10" ports: - 80 - 443 env: MODE: prod DEBUG: false
Common mistakes
The Norway problem
In YAML 1.1, unquoted yes, no, on, off (and NO, the country code for Norway) become booleans. Quote them when they are meant as text.
Versions turning into numbers
1.10 unquoted is the number 1.1, and 1.0 becomes 1. Quote version strings.
Tabs for indentation
YAML forbids tabs for indentation; a single tab makes the file invalid. Use spaces.
A colon inside a value
An unquoted "key: value: more" starts a new mapping. Quote values that contain ": " or start with characters like @, `, * or &.
Leading zeros
File modes like 0755 are read as octal numbers in YAML 1.1. Quote them to keep the exact text.
How it works
- 1
Paste or open your JSON
Any valid JSON works: objects, arrays or a single value.
- 2
Get readable YAML
Block style with 2-space indentation. Values like "yes", "on", "1.0" or "null" stay strings by being quoted.
- 3
Copy or download
Save it as a .yaml file or paste it straight into your config.
Questions
- Why are some strings quoted?
- YAML reads bare words like yes, no, on, off, null and numbers as booleans, null or numbers. Quoting keeps them as the strings they were in your JSON.
- Is the output valid YAML?
- Yes. It reads back to exactly the same data in both YAML 1.1 and 1.2 parsers; this is checked on thousands of tricky inputs in our tests.
- Is my data uploaded?
- No. The conversion runs in this tab.