YAML to JSON Converter
Convert YAML (Kubernetes manifests, CI workflows, OpenAPI files) to JSON. Anchors and aliases are expanded, multi-document files become an array, and you choose YAML 1.2 or 1.1 typing.
Why "NO" turns into false: YAML's type guessing
YAML guesses types for unquoted values. YAML 1.1 (PyYAML, older Ruby and Go libraries) treats many words as booleans and numbers; YAML 1.2 narrowed the rules. Flip the version and watch the JSON change.
| YAML | Meant as | Becomes (YAML 1.1) |
|---|---|---|
country: NO | ISO code for Norway | false booleanchanges in 1.2 |
enabled: on | a feature flag | true booleanchanges in 1.2 |
answer: yes | a survey answer | true booleanchanges in 1.2 |
port: 010 | a zero-padded number | 8 numberchanges in 1.2 |
duration: 12:30 | a time of day | 750 numberchanges in 1.2 |
version: 1.10 | a version string | 1.1 number |
size: 1e3 | scientific notation | 1000 number |
owner: ~ | the tilde | null null |
country: "NO" | quoted | "NO" string |
1.1 → false boolean · 1.2 → "off" string
The fix is always the same: quote values that must stay strings ("NO", "1.10", "010"). The JSON to YAML converter on this site does that for you.
How it works
The YAML is parsed into plain values and written out with JSON.stringify. Comments are dropped because JSON has none.
Bare words are typed by the YAML version: in 1.1, yes/no/on/off become booleans and 010 is octal; in 1.2 they stay strings and decimals. Try it in the explainer below.
Everything above runs in JavaScript inside this tab. Your data is not uploaded. Inputs are remembered in this browser only so they survive a reload; you can switch that off on the privacy page.
Questions
Why did "no" become false?
That is YAML 1.1 behaviour (the "Norway problem": the country code NO becomes false). Switch to YAML 1.2, or quote the value.
What happens to anchors (&) and aliases (*)?
They are expanded, so the JSON contains a full copy of the anchored value at each alias.
What about multiple documents separated by ---?
Each document becomes one element of a JSON array.
Is my YAML sent to a server?
No. Conversion happens in your browser. The only network request is the optional AI explanation when your input has an error and you ask for it.