JSON to YAML converter
Paste JSON and see it as YAML below, as you type: block style, with every number exact and several JSON values as separate YAML documents.
How the values come out
Objects become mappings and arrays become lists, in block style with the indent you choose. Strings are quoted only where YAML needs it: "true", "1.0" or "null" keep their quotes, so they stay strings instead of turning into a boolean, a number or nothing. Big integers keep every digit.
Several JSON values
JSON values one after another, or JSON Lines, become separate YAML documents, divided by ---.
For Kubernetes, Compose and CI
Most configuration tools read YAML: write or generate a manifest, a Compose file or a pipeline as JSON, convert it, and paste the YAML in. Keys keep the order they have in the JSON, so a manifest still starts with apiVersion and kind.
Copy, download or keep editing
The YAML follows your typing, and a mistake in what you paste is pointed out first, with its line and column. Copy or Download take the YAML as it is; Use as text puts it in the editor in place of what you pasted (Ctrl+Z goes back).
Private: nothing is uploaded
Formatting, checking and comparing all happen in your browser. Your documents are saved in the browser's own storage on this computer, not on a server, so they never leave your device.
With your permission, we count anonymous visits (which pages and tools are used), never what you type. See Privacy.
Questions
How do I convert JSON to YAML?
Paste or open the JSON: the YAML appears below it straight away, ready to copy or download.
Can the YAML have comments?
JSON has none to carry over, so the YAML starts without them. Add them once it is in its file; YAML comments start with #.
Does the YAML read back as the same JSON?
Yes: converting it back (YAML to JSON) gives the same values, with every number exact.
Is my data uploaded anywhere?
Your documents aren't: everything runs in your browser, and they are saved on your computer, in the browser's storage for this site. With your permission we count anonymous visits, never their content.
More tools
- Formatter & Converter for JSON, YAML, XML, SQL
- YAML to JSON Converter
- JSON to TOML Converter
- TOML to JSON Converter
- CSV to JSON Converter
- JSON to CSV Converter
- psql Output to CSV Converter
- XML to JSON Converter
- JSON to XML Converter
- Free Online Diagram Maker & Editor
- Crypto Tools: Passwords, Keys, Hashes & JWTs
- Timestamp, Cron, Regex & UUID Utilities