Code · Made a little simpler
YAML and JSON Converter
Convert JSON to block YAML or YAML to compact or indented JSON. Preserve long integers and decimal digits, expand aliases and download the result locally.
Keeping types when converting JSON and YAML
Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
YAML and JSON Converter: how to use it
- Choose JSON to YAML or YAML to JSON. Paste the source or select a local UTF-8 file.
- Convert one document. For a single-line JSON result, select Compact JSON before converting.
- Compare the preview and output byte count, then copy or download the complete document.
Limits and notes
UTF-8 files up to 4 MiB or pasted text up to 4,194,304 UTF-16 code units. Supports YAML 1.2 core values and string keys for JSON objects. Cycles, non-finite floats and multi-document streams cannot be represented by this conversion. The output limit is 16,777,216 characters.
How your privacy works →YAML and JSON Converter: common questions
How do I keep a leading zero in an ID?
Use a quoted string such as "007". A numeric YAML value like 007 has integer semantics and can become the JSON number 7.
What does Compact JSON change?
It removes formatting spaces and line breaks between JSON values. Whitespace inside a string keeps its meaning.