YAML
Convert YAML to JSON and back, with warnings for the syntax that quietly means something unintended.
- L26'no' is read as the boolean false, not the string "no" — this is the Norway problem. Quote it if you meant text.
{
"version": 2.1,
"defaults": {
"image": "node:22-alpine",
"working_directory": "~/repo",
"shell": "/bin/sh -eo pipefail"
},
"jobs": {
"build": {
"image": "node:22-alpine",
"working_directory": "~/repo",
"shell": "/bin/sh -eo pipefail",
"parallelism": 4,
"steps": [
"checkout",
{
"run": {
"name": "install",
"command": "npm ci --no-audit"
}
},
{
"run": {
"name": "build",
"command": "npm run lint\nnpm run build\nls -la dist/\n"
}
}
]
},
"deploy": {
"image": "node:22-alpine",
"working_directory": "~/repo",
"shell": "/bin/sh -eo pipefail",
"interruptible": false,
"regions": [
"us-east-1",
"eu-west-1"
],
"retries": 3,
"timeout": 12.5,
"notes": "Deploys run from the release branch only. Rollback is manual.",
"env": {
"BUILD_ID": "0042",
"DRY_RUN": false,
"TAG": null
}
}
}
}- nested block mappings and sequences
- flow collections, over several lines
- plain, single- and double-quoted scalars with escapes
- block scalars: | and > with - or + and an indent digit
- comments, multiple documents, --- and ...
- anchors, aliases and the << merge key
- ~ / null / empty, YAML 1.1 booleans, ints, floats, hex and 0o octal
- tags (!!str, !Ref, %TAG)
- explicit '? key' entries and collections used as keys
- single-pair mappings inside a flow sequence
- self-referencing anchors
- tabs used for indentation
A practical YAML subset, not the whole 1.2 spec — anything outside it is refused with the line number rather than quietly mis-read. Bare yes, no, on and off are read as booleans the way YAML 1.1 says, and each one is flagged above: that is the Norway problem, where a country code turns into false. Quoted numbers stay strings, and an integer past 2^53 stays a string too rather than losing digits. Going the other way, any string that would be read back as a number, a boolean, a null, or that carries a colon-space, an edge space or a leading indicator character comes out quoted.
YAML has famous traps. Unquoted `no` and `off` can become booleans, a version number like `1.20` loses its trailing zero as a float, and indentation errors produce a valid document with the wrong shape.
Convert in either direction and get warnings for the constructs that commonly bite — implicit booleans, values that will be read as numbers, duplicate keys and tabs. Better to see them here than in a cluster that silently took the wrong config.
What people open it for
- Converting a Kubernetes or CI config to JSON to inspect it
- Checking whether a value is being coerced to a boolean or number
- Finding duplicate keys in a long config file
In the terminal
tools yaml
Every utility is also a command in the desktop's shell.