🔄 JSON ↔ YAML Converter

Paste JSON or YAML and convert it to the other format — nested objects, arrays and comments handled, entirely in your browser.

Frequently Asked Questions

What is the difference between JSON and YAML?

JSON (JavaScript Object Notation) uses braces, brackets and quotes, and is the standard for APIs. YAML (YAML Ain't Markup Language) uses indentation instead of braces, supports comments, and is preferred for configuration files like Kubernetes manifests, docker-compose.yml, and GitHub Actions workflows. Both represent the same data structures: maps, lists and scalars.

Does this converter handle nested objects and arrays?

Yes. Nested objects become indented YAML mappings, arrays become "-" sequences (including arrays of objects), and the YAML → JSON direction parses the same structures back. Flow-style YAML values like [1, 2, 3] or {"a": 1} are also accepted when written in JSON syntax.

What happens to YAML comments when converting to JSON?

Comments (lines or trailing text starting with #) are stripped, because JSON has no comment syntax. Document markers (--- and ...) are ignored too.

Are all YAML features supported?

The converter supports the common YAML subset used in config files: block mappings and sequences, quoted and plain scalars, numbers, booleans, null, comments, and JSON-style flow values. Advanced features like anchors/aliases (&, *), multi-line block scalars (| and >), and multiple documents in one file are not supported.

Why are some strings quoted in the YAML output?

Strings that could be misread as another type — like "true", "123", "null", or values containing ":", "#" or leading special characters — are automatically quoted so the YAML stays unambiguous and round-trips back to the same JSON.

Is my data uploaded to a server?

No. The conversion runs entirely in your browser with JavaScript — your JSON or YAML never leaves your device, so it is safe for config files containing internal names or settings.

About Privacy My Account
Powered by AppCafe.in