JSON to YAML Converter
JSON to YAML, without the type surprises. Paste JSON and get clean, readable YAML in seconds. Strings that would silently change type stay strings, multiline text stays readable, and the reverse toggle turns YAML back into JSON. Runs entirely in your browser.
Convert JSON to YAML Online
Built for turning API responses, logs, and code snippets into the YAML that Kubernetes, GitHub Actions, OpenAPI, and docker-compose expect. Quotes strings that would otherwise parse as booleans or numbers, expands anchors and aliases, and keeps long lines intact. A direction toggle converts YAML back to JSON with precise line numbers on errors. Fully client-side: nothing leaves your browser.
Messy JSON first? Open the JSON Formatter. Need to diff two files? Try JSON Compare. Exporting to a spreadsheet? Use the JSON to CSV Converter.
YAML output
JSON output
How to use:
- Paste your JSON, or drop a .json or .txt file, into the input box
- Leave the direction switch on JSON to YAML (the default)
- Read the YAML on the output pane: 2-space indent, block style, multiline text as literal blocks, long lines never wrapped
- Copy it, or download the .yaml file
- Going the other way: flip the switch to YAML to JSON, paste YAML, then Copy JSON or Download .json
- Parse errors point at the exact line and column; fix the input and convert again
Everything runs in your browser: no network calls, no analytics on your input, nothing stored.
Why use this JSON to YAML converter?
Round-trip fidelity
Values like "true", "no", or "0123" stay exactly what they are: the output quotes anything a YAML parser would misread as a boolean, null, or number.
Readable by default
Multiline text becomes a literal block, not a one-line string full of \n escapes, and long lines are never wrapped or folded.
Both directions, one page
YAML to JSON is the toggle, not a second website, and errors show the exact line in either direction.
Private and instant
Everything runs in your browser: no upload, no queue, no rate limit.
Known limit, stated honestly
Numbers beyond 2^53 (about 9 quadrillion) lose precision in any browser tool, this one included; identifiers that large should stay strings in the source.
Frequently Asked Questions
Is my data uploaded?
No. Parsing and conversion run entirely in your browser; nothing is sent to any server.
Can I convert YAML back to JSON?
Yes, with the direction toggle above the editor. The same precision applies in reverse, with line-numbered errors.
Why did my unquoted "no" become false?
Unquoted yes/no/on/off/null are booleans and null in YAML; quote them to keep them strings. Unquoted numbers and dates are typed as well: 0123 arrives as the number 123, and 2026-10-15 as a full UTC timestamp. The converter follows the YAML spec, so the JSON output shows what a YAML parser actually sees.
Why are some strings quoted in the YAML output?
Strings like "true", "123", or "null" would be read back as booleans or numbers if unquoted; quoting them keeps the file round-trip exact.
Are anchors and aliases supported?
Yes. In the YAML to JSON direction each alias is expanded to the value it points at, because JSON has no alias concept. Duplicate keys are reported as an error with the line number instead of silently keeping the last one.
What about multiple documents separated by ---?
They convert to a JSON array with one element per document, and a note tells you how many documents were found, so nothing is dropped.