Free JSON to YAML Online

Convert JSON data to YAML format for configuration files. Preserves data structure and types.

Last updated

JSON is the lingua franca of APIs. YAML is what most modern infrastructure tools expect for their config files — Kubernetes manifests, GitHub Actions workflows, Docker Compose files, Ansible playbooks, OpenAPI specs. Sooner or later you have a JSON object and you need it in YAML, or vice versa, and rewriting it by hand is exactly the kind of mechanical task that wastes an hour and introduces a typo. Our free online JSON to YAML converter does the round trip cleanly. Paste JSON into the input pane, see the equivalent YAML appear immediately in the output pane (or paste YAML and switch the direction). The converter handles all the tricky cases that bite hand-translation: nested objects becoming indented blocks, arrays becoming dash-prefixed lists, strings that need quoting because they contain special characters or look like booleans (`yes`, `no`, `on`, `off` are all gotchas in YAML 1.1), strings with leading whitespace, multi-line strings that need the `|` or `>` block scalar syntax, and integers that should not become floats. Real-world workflows: turning a JSON config file into a Kubernetes ConfigMap entry, converting an OpenAPI JSON spec into the YAML format that Swagger Editor likes, taking an API response and pasting it into a GitHub Actions matrix definition, or migrating a Node.js project's JSON config to a YAML equivalent for human readability. Both directions run locally in your browser — no upload, no signup, no daily limit. After converting, the [JSON Formatter](/tools/json-formatter) is the right place to validate and prettify the JSON side, and the [Code Beautifier](/tools/code-beautifier) handles indentation cleanup if you need to embed the result inside a larger config file.

How to Use JSON to YAML

1

Paste Your JSON

Drop JSON into the input pane. Both compact and pretty-printed JSON are accepted. Switch the direction toggle to convert YAML → JSON instead.

2

See the YAML Output

The output pane updates instantly. Indentation is 2 spaces by default; you can change it in the settings.

3

Copy or Download

Copy the result to your clipboard or download as a `.yml` / `.yaml` file ready to drop into a config directory.

Features

Bidirectional

Convert JSON → YAML or YAML → JSON in the same page with a single direction toggle.

Smart Quoting

Strings that look like booleans, numbers, or contain special characters are quoted automatically — preventing the YAML "Norway problem" where `no` becomes `false`.

Multi-Line Strings

Long string values are emitted using YAML's block scalar syntax (`|` or `>`) for readability.

Indent Configurable

Pick 2-space (the default and the YAML community convention) or 4-space indentation.

Benefits of Using JSON to YAML

Completely Free

Use JSON to YAML without any cost, limits, or hidden fees. No premium plans needed.

No Installation

Works directly in your browser. No software downloads or plugins required.

100% Private

Your files and data are processed locally. Nothing is uploaded to external servers.

Works Everywhere

Compatible with Chrome, Firefox, Safari, Edge on desktop, tablet, and mobile.

No Sign-Up

Start using the tool immediately. No account creation or email verification.

Always Available

Access this tool 24/7 from anywhere in the world, on any device.

Frequently Asked Questions

YAML 1.1 treats unquoted `no`, `yes`, `on`, `off`, `true`, `false` as booleans. The country code for Norway is `NO`, which means a YAML file with `country: NO` parses as `country: false` in older YAML libraries. The converter quotes such values automatically to prevent this. YAML 1.2 fixed the spec but many parsers still default to 1.1 behaviour.
Yes. `["a", "b", "c"]` becomes: ``` - a - b - c ``` Nested arrays and arrays of objects are handled correctly with proper indentation.
Strings containing colons, hashes, leading whitespace, or YAML reserved characters are quoted with double quotes. Strings with embedded quotes use the appropriate escaping. The result is always valid YAML.
Yes — the direction is a single toggle. YAML input is parsed and emitted as JSON with your preferred indentation. Useful for converting a Kubernetes manifest or GitHub Actions workflow into a JSON form for tooling that needs it.
On the input side, anchors and aliases are resolved (so the JSON output reflects the expanded data). On the output side, anchors are not generated automatically because their use depends on context.
Yes — invalid JSON shows the parser error with a line and column number before any conversion attempt. Use the [JSON Formatter](/tools/json-formatter) for deeper validation and pretty-printing.

Complete Your Converters Workflow

These free tools work seamlessly with JSON to YAML to handle every step of your workflow.