Convert config files in both directions, covering nested maps, lists, comments and block scalars.
Covers the config file subset: nested maps, lists, comments, quoted strings, inline collections and block scalars. Anchors, aliases, tags and multiple documents are not supported.
YAML to JSON is what you want when reading a Kubernetes manifest, a Docker Compose file or a CI pipeline. JSON to YAML is for turning an API payload into a readable config.
Indentation defines the structure in YAML, so paste it exactly as it appears in the file. Comments, quoted strings and inline collections are all understood.
Conversion runs as you type. If a line cannot be read the tool names the line number instead of producing a document that only looks correct.
The subset configuration files actually use: nested mappings, sequences, scalars, comments, quoted strings, inline collections and block scalars. Anchors, aliases, tags, multiple documents and complex keys are not supported and are flagged rather than guessed at.
No. Conversion happens in your browser. This matters for YAML in particular, since manifests and pipeline files frequently contain hostnames, environment names and occasionally secrets.
Because it would otherwise be read back as a different type. A string such as 123, true or no gets quotes so a later parser returns your string rather than a number or a boolean.
A single document, yes. Files containing several documents separated by three dashes are not supported, so split them and convert one at a time.
No, and neither does this tool. The YAML specification forbids tabs for indentation, so use spaces. Most editors can convert them for you.
They are removed. JSON has no comment syntax, so there is nowhere for them to go when converting in that direction.
The output is regenerated from the data, not from your formatting. The structure and values match, but comments, key order in some cases, and stylistic choices are not preserved.
Yes, completely free with no sign-up, like every tool in the Pinkontin toolbox.
Free online JSON formatter and validator. Format, minify and validate JSON with syntax highlighting and instant error detection.
Open ToolGenerate TypeScript interfaces from a JSON payload, with named interfaces for nested objects.
Open ToolIndent, validate and minify XML. Catches parse errors before you paste a broken feed or sitemap into production.
Open Tool