Report

Help us improve this tool

JavaScript Object to YAML Converter

Convert JavaScript object or array literals to clean YAML with optional key sorting.

O M T

Turn JavaScript objects into YAML

Dev fixtures and Kubernetes-style configs are often authored as JavaScript literals in tests or scripts. Convert them to readable YAML for editors, CI templates, or documentation.

Pair with: INI to YAML Converter, JavaScript Object to XML Converter.

Frequently Asked Questions

Does this accept strict JSON?

Yes. JSON is valid JavaScript for object and array literals, so pasted JSON works as input.

Can I sort keys in the YAML output?

Enable alphabetical key sorting to produce stable diffs when committing generated YAML files.