YAML to JSON Converter
Convert any YAML document back to JSON. Supports YAML 1.1 and 1.2, anchors, aliases, and multi-document files.
Output will appear here…Convert YAML configs back into JSON
YAML is great for writing config files by hand, but it has quirks that bite you when you need to consume those files programmatically. The boolean coercion rules (yes,no, on, off all become booleans in YAML 1.1) and the strict indentation rules make YAML error-prone in automated pipelines. JSON is simpler — strict, predictable, supported everywhere — and is often a better choice for machine-to-machine communication.
The converter uses js-yaml to parse your YAML and then serializes the result as JSON. It supports YAML 1.1 (the version most tools use), resolves anchors and aliases, and handles multi-document files by producing a JSON array with one object per document. The output is indented for readability and can be downloaded as a JSON file.
Anchors and aliases are resolved
YAML supports anchors (&anchor) and aliases (*anchor) as a way to reuse a value multiple times in the same document. Lintify resolves these during parsing — the alias is replaced by the anchored value in the resulting JSON. The anchors themselves disappear because JSON has no equivalent feature. If you need to preserve them, you have to keep the file in YAML.
Multi-document YAML files
YAML supports multiple documents in a single file, separated by ---. This is the standard format for Kubernetes manifests, where a single file can define multiple resources. Lintify converts a multi-document YAML file into a JSON array of objects — one object per document. The order is preserved.
Common YAML pitfalls
The most common YAML pitfalls are: inconsistent indentation (YAML is strict about spaces versus tabs), missing spaces after colons (key:value is invalid; it must be key: value), unquoted strings that happen to look like numbers or booleans, and tabs used for indentation (forbidden by the spec). The parser reports the line number of the error, which usually points at the problem.
Frequently asked questions
Common questions about the YAML → JSON tool.