About this tool
Convert YAML to JSON or JSON back to YAML instantly as you type. Pick the direction, paste your document, and get clean output with your preferred indentation (2 or 4 spaces, or minified JSON). Multi-document YAML files separated by --- are converted into a JSON array, and the swap button feeds the output back in and flips the direction so you can round-trip a document in one click.
Parsing uses the strict JSON schema, so values that YAML would normally coerce — like unquoted dates and timestamps — stay as plain strings and your JSON keeps pure JSON types. Syntax errors are reported with the parser's reason plus the line and column where they occurred, which makes it a quick validator for Kubernetes manifests, docker-compose files, CI pipelines and other YAML configs.
The conversion happens entirely in your browser with an open-source YAML parser — your configuration files, which often contain hostnames, keys and other sensitive values, never leave your device. No uploads, no account, and it works offline once loaded.
Frequently asked questions
How are YAML dates and timestamps converted?
This tool parses with the strict JSON schema, so unquoted dates like 2024-01-15 stay as plain strings instead of being coerced into date objects. Your JSON output keeps pure JSON types: strings, numbers, booleans, null, arrays and objects.
Does it support multi-document YAML files?
Yes. A YAML stream with several documents separated by --- lines is converted into a single JSON array with one element per document. A single document converts to its value directly.
Why is my YAML reported as invalid?
The error message shows the parser's reason with the line and column of the problem. The most common causes are inconsistent indentation (YAML forbids tabs), a missing space after a colon, and unquoted strings containing special characters like : or #.
Is my configuration file uploaded anywhere?
No. The converter runs entirely in your browser using the open-source js-yaml library — your file never leaves your device, which matters because config files often contain hostnames, tokens and credentials.
More tools