JSON to YAML
Convert JSON files or pasted JSON text to YAML directly in the browser.
YAML settings
Input
Private by design: your file never leaves your device.
Output
Paste valid JSON to see the YAML preview.
Paste valid JSON to see the YAML preview.
Good to know
Good to know
The JSON to YAML converter converts JSON into YAML directly in your browser, with three null representations (~, text "null", or empty), a selectable string style (automatic, single, or double quotes), and an option to sort object keys alphabetically for more stable comparisons.
Typical searches include JSON to YAML, YAML generator, and Kubernetes YAML. Indentation (2 or 4 spaces), line width, a document-start marker (---), and a trailing newline can each be controlled individually. YAML is readable but sensitive to indentation and data types; validate the output in the target system, especially for Kubernetes or OpenAPI manifests.
Typical use cases
Generate a Kubernetes manifest from a JSON configuration
Convert a JSON configuration to YAML and enable the document-start marker when the target system expects multiple YAML documents.
Generate stable YAML output for version comparisons
Enable key sorting so the same data is always output in the same order — useful for diffs in Git.
Tips for better results
Deliberately quote strings with special characters
Force double quotes when strings contain values like "yes", "no", or numbers that could otherwise be ambiguously interpreted as other YAML types.
Resolve duplicate keys before converting
If duplicate JSON keys are treated as an error, deliberately clean up the source instead of relying on the automatic last value.
How it works
How it works
Step by step
Features
Features
Three null representations
Choose ~, the text "null", or an empty representation for JSON null.
Key sorting for stable diffs
Sort object keys alphabetically so identical data is always output the same way.
Local processing
Your data never leaves your device; conversion runs entirely in the browser.
Frequently asked questions
Frequently asked questions
How is JSON null represented in YAML?
Selectable between the tilde ~, the text "null", or an empty representation, depending on desired readability.
Is my data uploaded?
No. Conversion runs entirely locally in the browser.
More tools
More tools
YAML to JSON
Convert YAML files or pasted YAML text to JSON directly in the browser.
JSON Formatter
Validate, format, minify, analyze, and inspect JSON as a tree locally.
JSON to TOML
Convert strict JSON to readable TOML locally in the browser.
JSON to XML
Convert JSON files or pasted JSON text to XML directly in the browser.