JSON to YAML
Runs locally in your browser. Nothing leaves your device.Convert JSON files or pasted JSON text to YAML directly in the browser.
YAML settings
Input
Output
Paste valid JSON to see the YAML preview.
Paste valid JSON to see the YAML preview.
How it works
- 1
Paste JSON or open a file
Paste JSON or open a JSON or TXT file.
- 2
Choose the style and formatting
Choose the null representation, string style, indentation, and key sorting.
- 3
Copy or download the YAML
Copy the generated YAML or download it as a file.
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.
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.
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
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
Looking for another tool?
Every tool runs locally in your browser – no sign-up, no upload, and it works offline.