Paste your JSON or YAML
A configuration file, an API definition, a manifest or a snippet.
Paste JSON to get YAML, or YAML to get JSON. Useful for Kubernetes and Docker Compose files, CI pipelines, OpenAPI documents and application settings.
100% private — your text is processed in your browser and never sent to any server.
Keep going with your result in another tool. Nothing is uploaded.
A configuration file, an API definition, a manifest or a snippet.
JSON to YAML or YAML to JSON, with the indentation you prefer.
Errors are reported with their line and column so you can fix them.
JSON and YAML can describe exactly the same data: objects, lists, strings, numbers, booleans and null. JSON is strict and compact, and it is what programs and web APIs speak. YAML is written for people, with indentation instead of braces, comments and less punctuation, and it is the language of many configuration files: Kubernetes manifests, Docker Compose, GitHub Actions and other CI pipelines, OpenAPI descriptions and Ansible playbooks. Moving from one to the other is a regular chore, and this tool does it in a click.
Paste JSON and get readable YAML with the indentation you choose. Objects become indented key-value pairs, lists become dashed items and strings that could be mistaken for something else, such as "true" or "123", are quoted, so their type survives the trip. Keys can be sorted alphabetically. If the JSON has the usual problems of copied text, such as single quotes, trailing commas or comments, the repair option fixes them first.
Paste YAML and get valid JSON. Anchors and aliases are resolved, and multi-line strings are read according to the YAML rules. A file with several documents separated by three dashes gives an array with one entry per document. If the YAML is invalid, for example because of a bad indentation, you get the line and column of the problem and a short reason. Dates written the YAML way are converted to ISO text.
It does not validate against a schema such as a Kubernetes or OpenAPI definition; it checks syntax only. The formatting of the YAML it produces is the standard style, and it will not preserve the original layout, comments or key order of a document when going through JSON. To format or check plain JSON, use the JSON formatter.
More utilities that also run without leaving your browser.