Convert JSON to YAML
Turn JSON from an API or a tool's output into YAML for a config file, a Helm values file or a CI pipeline. Strings that some YAML parsers would misread are quoted for you.
- Free
- Runs in your browser
- Safe quoting
- No sign-up
How It Works
Convert JSON in three steps.
Paste JSON
An object or array from anywhere.
Choose the style
Indent, quoting, key sorting and line wrapping.
Copy or download
Copy the YAML or save it as converted.yaml.
Writing YAML that every parser reads the same
YAML has a famous trap: older parsers (YAML 1.1, used by PyYAML and many Kubernetes tools) read unquoted yes, no, on, off and y as booleans, so a country code of NO can turn into false. This converter writes with YAML 1.1 quoting rules, so any string that could be misread, including those words, numbers with leading zeros and date-like text, is put in quotes. The result is valid for both YAML 1.1 and 1.2 parsers.
JSON has no comments, so the YAML has none either. Add them afterwards to explain settings for whoever edits the file next.
Safe quoting
"yes", "off", "012" and "2025-01-01" stay strings in every parser.
Sort keys
Optional alphabetical keys for stable, diff-friendly files.
2 or 4 spaces
Lists are indented under their key, the style most projects use.
Long strings
Keep long strings on one line, or fold them at 80 characters.
Convert PDF Files and File Formats
Find the perfect online tool to combine PDF files, compress documents, and handle your daily workflow effortlessly.
PDF Tools
All your PDF needs in one place
- Merge PDF
- Organize PDF
- Split PDF
- Compress PDF
- Convert to Word
- Convert to Image
Image Tools
Edit and optimize your images
- Resize Image
- Compress Image
- Convert Format
- Crop Image
- Add Watermark
- Remove Background
Word Tools
Work with Word documents
- Convert to PDF
- Merge Documents
- Split Documents
- Compress File
- Edit Text
- Add Watermark
Excel Tools
Process Excel spreadsheets
- Convert to PDF
- Convert to CSV
- Merge Sheets
- Split Sheets
- Compress File
- Clean Data
Why Use This Converter
Config-ready YAML from JSON.
No boolean surprises
Ambiguous strings are quoted automatically.
Stable output
Sorted keys make reviews and diffs easier.
JSON errors located
Invalid JSON is reported with a line and column.
Private
Converted in your browser.
Frequently Asked Questions
Questions people ask about the JSON to YAML converter.
Only strings that a YAML parser could read as something else are quoted: words like yes and off, numbers with leading zeros, and text that looks like a date or number. Tick Quote all strings to quote every one.
Yes. It is standard YAML. Kubernetes and Compose read it the same way they read hand-written files.
Yes, that is the default. Tick Sort keys A to Z only if you want alphabetical order.
Use the YAML to JSON tool. Values survive the round trip unchanged.
Related Text & Developer Tools
More small utilities that run in your browser.
YAML to JSON
Convert YAML to JSON, with errors shown by line.
JSON Formatter
Format, validate and minify JSON.
JSON to XML
Convert JSON to well-formed XML.
JSON Flatten & Unflatten
Flatten nested JSON to dot keys or rebuild it.
TSV to JSON
Convert tab-separated data to JSON and back.