JSON to YAML Converter
Paste JSON and get block-style YAML back, with a choice of indentation and optional key sorting. Strings that YAML could misread as booleans, numbers or dates are quoted for you. Everything runs locally in your browser — your data is never uploaded.
Runs locally in your browserHow to use JSON to YAML Converter
- Paste JSON. Paste a JSON document into the input panel.
- Choose options. Pick 2- or 4-space indentation and whether to sort keys.
- Convert and export. Click Convert, then copy or download the YAML.
Example
Strings that YAML would misread are quoted so they stay strings.
Input
{"name":"demo","enabled":"yes","version":"1.10","ports":[80,443]}Options: 2 spaces
YAML
name: demo enabled: "yes" version: "1.10" ports: - 80 - 443
Unquoted, yes would become the boolean true in YAML 1.1 parsers and 1.10 would become the number 1.1.
Formats, limits and privacy
- Input
- JSON
- Output
- YAML
- Limits
- Produces block-style YAML; flow style ({ } and [ ]) is used only for empty objects and arrays.
- Converts JSON to YAML only, not YAML back to JSON.
- No fixed size limit; very large inputs depend on your device's memory.
- Privacy
- Everything happens in your browser. Your input is never uploaded to a server.
Troubleshooting
A value is quoted when I did not expect it
It looks like a boolean, number, null or date to a YAML parser. The quotes keep it a string, which is what your JSON said it was.
Kubernetes or Docker rejects the indentation
Both accept 2-space YAML. If you paste into an existing file, make sure the pasted block lines up with the level it belongs to.
My JSON fails to convert
The input must be valid JSON. Run it through the JSON Formatter first to find the error.
Frequently asked questions
Is my JSON uploaded anywhere?
No. The conversion runs entirely in your browser.
Why are some strings wrapped in quotes?
A plain YAML value like true, 123, null or 2020-01-01 would be read as a boolean, number, null or date. Strings that look like those (or contain characters such as ": " or a leading "-") are quoted so they stay strings when the YAML is parsed again.
How are multi-line strings written?
As a double-quoted string with escapes, which is valid YAML and round-trips exactly.
Does key order change?
Not unless you enable "Sort keys", which sorts object keys alphabetically at every level. Array order is always preserved.