YAML ↔ JSON Converter — Free Online Tool
Convert between YAML and JSON in both directions. Supports nested objects, arrays, strings, numbers, booleans, comments. Choose indent size, optional key sorting.
YAML ↔ JSON Converter — Bidirectional, Live Conversion
Convert between YAML and JSON in both directions, instantly as you type. Supports nested objects, arrays, strings (plain and quoted), numbers, booleans, null, comments, and flow-style sequences/mappings. Useful for config files, API payloads, CI/CD pipelines, Kubernetes manifests, and anywhere YAML and JSON are interchangeable. Everything runs in your browser — no uploads.
Supported YAML features
- Mappings:
key: value - Sequences:
- itemor flow[a, b, c] - Nested structures: objects of arrays of objects, etc.
- Scalars: plain strings, single/double-quoted strings, integers, floats, booleans (true/false/yes/no), null (~/null)
- Flow style:
{key: value, other: 1}and[1, 2, 3] - Comments:
# this is ignored - Document markers:
---and...are skipped
Limitations
This converter implements a common YAML subset. The following advanced features are NOT supported: multi-line block scalars (| and >), anchors and aliases (&, *), tags (!!), and complex keys. For 99% of config files this is plenty — but if you have YAML using those features, you’ll need a specialized library.
Common uses
- Converting Kubernetes/Docker Compose YAML manifests to JSON for API calls
- Converting JSON config to YAML for human editing
- Cleaning up YAML formatting and standardizing indent
- Sorting keys alphabetically for diff-friendly configs
- Validating that YAML actually parses correctly
Privacy
Everything runs in your browser. Your configs never leave your machine.
Frequently asked questions
Which YAML elements are supported?
Nested objects, lists, strings, numbers, booleans, null, comments and the compact (flow) notation for lists and mappings.
Why convert between YAML and JSON?
For configuration files, API payloads, CI/CD pipelines and Kubernetes manifests, where the two formats are often interchangeable.
What happens to YAML comments?
JSON does not support comments, so they are lost when converting from YAML to JSON.