Converts a YAML document to JSON using the YAML 1.2 core schema in safe mode. Explicit tags such as !!python/object or !custom are rejected because some languages use them to instantiate arbitrary objects; duplicate keys are an error and aliases are capped to prevent “billion laughs” expansion attacks.
Key order is preserved and large integers are written exactly in the JSON.
How to use it
- Paste the YAML or open a .yaml/.yml file.
- Pick the JSON indentation.
- Press Run and review the type warnings.
Example
service: api
replicas: 3
ports:
- 8080
- 8443
env:
LOG_LEVEL: info
FEATURE_X: yes
{
"service": "api",
"replicas": 3,
"ports": [
8080,
8443
],
"env": {
"LOG_LEVEL": "info",
"FEATURE_X": "yes"
}
}
Limitations
- One document per conversion (no multiple blocks separated by ---).
- Merge keys (<<), mapping or sequence keys and .inf/.nan (not representable in JSON) are not supported.
- Decimals with more than 15–17 significant digits may be rounded.
FAQ
- Why does "yes" come out as text instead of true?
- Because YAML 1.2 only recognizes true and false as booleans. If your tool uses YAML 1.1 that value would be a boolean: the conversion warns you.
- Is it safe to paste YAML from an unknown source?
- The tool never executes tags or resolves external references and it caps aliases; still, avoid pasting secrets unnecessarily.