YAML to JSON Converter
Paste YAML - a Kubernetes manifest, a CI workflow, an OpenAPI spec - and get JSON back, formatted or minified. Also a quick way to check whether a YAML file parses at all.
A YAML syntax checker as a side effect
YAML is whitespace-sensitive and unforgiving about tabs, so an invalid file is common. If the document does not parse, the tool reports the parser message together with the line it failed on, which is usually enough to find the mis-indented key or the tab character that slipped in.
Formatted or minified JSON
Choose two-space, four-space or tab indentation for a readable document, or minify to a single line when you need to paste the value into an environment variable, a query string or a database column. Sorting keys makes two converted files directly comparable.
What YAML features are supported
The full YAML 1.2 core schema: block and flow collections, multi-line scalars, anchors and aliases, explicit tags and quoted strings. Anchors are expanded during conversion, since JSON has no equivalent - the output is the fully resolved document.
Frequently asked questions
Is my YAML uploaded anywhere?
No. Nothing you paste leaves your browser. The page loads a small amount of JavaScript, and every calculation happens on your own machine - there is no server to send data to. Manifests and CI workflows regularly contain secrets, so nothing is transmitted or logged.
Why does my YAML fail with an indentation error?
YAML forbids tab characters for indentation - only spaces are allowed. Editors that insert tabs are the most frequent cause. Other common problems are a missing space after a colon, inconsistent indentation between sibling keys, and an unquoted value containing a colon.
Can it handle multi-document YAML?
A file containing several documents separated by `---` is not valid as a single JSON value. Convert one document at a time, or wrap them into a list first - JSON has no multi-document concept.
Are comments preserved?
No. JSON has no comment syntax, so YAML comments are dropped during conversion. This is a property of the formats rather than of this tool: any YAML-to-JSON converter behaves the same way.