JSON to YAML Converter
Paste JSON to get the same data as YAML, ready for a Kubernetes manifest, a Docker Compose file or a CI config. Invalid JSON is reported with its line and column.
Output
🔒 Runs in your browser. Your data is never uploaded.
How to use
- Paste your JSON into the input box.
- Choose 2 or 4 spaces of indentation.
- Copy the YAML into your config file.
Quoting is handled for you
A JSON string such as "true", "123" or "null" would change type if written bare in YAML, so it is emitted in quotes. Strings containing line breaks become block scalars, which are much easier to read than \n escapes.
Frequently asked questions
- Is the key order preserved?
- Yes. Keys are written in the order they appear in the JSON; nothing is sorted.
- Can I add comments to the result?
- Yes. YAML supports comments starting with #, which JSON does not. Add them after converting.
- Why did a very large number change?
- JSON numbers are read as 64-bit floats, so integers above 9,007,199,254,740,991 lose precision before conversion. Store such IDs as strings.
Related tools
- YAML to JSON ConverterConvert YAML to JSON in your browser and see the line and column of syntax errors.
- JSON Formatter & ValidatorFormat, validate and minify JSON in your browser.
- JSON to CSV ConverterConvert a JSON array of objects to CSV for Excel or Google Sheets.
- Text DiffCompare two texts line by line and see what was added and removed.