JSON to YAML Converter Online

Convert JSON to clean YAML for Kubernetes, Docker Compose and CI configs, with your choice of indentation and collection style.

How to Convert JSON to YAML

Paste your JSON, set the indentation and collection style, and valid YAML appears immediately, ready to copy or download as a file.

Step 1

Paste Your JSON

Drop in a payload or config document, or start from the built-in example.

Step 2

Set Indent and Style

Choose two or four space indentation, and block or flow collections.

Step 3

Copy the YAML

Review the output, then copy it or download it as a .yaml file.

Turn JSON Into YAML for Kubernetes, Compose and CI Files

JSON is the format machines exchange. YAML is the format humans maintain. Kubernetes manifests, Docker Compose files, GitHub Actions workflows, GitLab CI pipelines and Ansible playbooks all read YAML, because indentation is quieter than braces and quotes when a file is reviewed every day. The awkward part is the seam between the two: a platform exposes its configuration as JSON, a generator emits JSON, an API returns JSON, and the toolchain downstream wants YAML.

This converter crosses that seam without losing anything. The document is parsed and re-serialised as YAML 1.2, so objects become mappings, arrays become lists and every scalar keeps its type: strings stay strings, numbers stay numbers, booleans stay booleans and null stays null. Indentation is two or four spaces per level, whichever your toolchain expects. Collections can be emitted in standard block style, or in compact flow style when you prefer inline lists and maps.

Key order is preserved throughout, which matters more than it sounds. A configuration file is read top to bottom, and a conversion that silently reorders its sections makes review harder than the format change was worth. The emitter also decides when a plain scalar needs quotes: a string that looks like a number, a boolean or null is quoted so it does not change type when the file is read back. Because the emitter quotes only where YAML requires it, the output stays clean: a value that needs quotes gets them, and everything else stays bare and readable.

Conversion runs entirely in your browser. Configuration payloads routinely contain registry credentials, tokens and internal hostnames, and none of that is uploaded here. There is no account to create, no queue to wait in and no document limit beyond what your device can hold in memory.

Copy the YAML or download it as a .yaml file and commit it alongside the rest of your configuration. Because the conversion is structural rather than textual, a minified input and a pretty-printed input produce identical YAML, which makes the result reproducible for a whole team. The conversion is lossless in the direction that matters: the same data, in the format your tools actually read.

Config-Ready Output

YAML that drops straight into Kubernetes manifests, Compose files and CI workflows.

Indentation Control

Two or four spaces per level to match the conventions of your toolchain.

Block or Flow Style

Standard block collections, or compact flow lists and maps when you prefer.

Key Order Preserved

Keys appear in the same order as the source JSON, so document flow is kept.

Native Types Intact

Strings, numbers, booleans and null keep their types across the conversion.

Copy or Download

Copy the YAML or save it as a .yaml file ready to commit to a repository.

FAQ

Frequently Asked Questions

Moving data from APIs and generators into tools that read YAML: Kubernetes manifests, Docker Compose files, GitHub Actions workflows, GitLab CI pipelines and Ansible playbooks, among many others in daily use.

Two spaces or four spaces per level. Both are common in the wild, and the choice lets the output match your existing files exactly rather than forcing a reformat later on.

Block style puts each list item and mapping on its own line, which is the convention for config files. Flow style writes collections inline, which suits only short lists and maps.

Yes. Keys appear in the same order as the source JSON, so a configuration file keeps the section order its author originally intended, which makes review diffs meaningful in version control.

Yes. Strings, numbers, booleans and null all survive the conversion unchanged, and the emitter quotes values only where YAML requires it, so nothing silently changes type when the file is read back later.

Yes, YAML is a superset of JSON. Conversion is still worth doing, because the indented form is what humans actually review and edit every day, and comments become possible, which JSON has no room for.

This tool converts JSON to YAML only, which keeps the output predictable. For the other direction, any standard YAML parser will read the file directly and hand you JSON back in one step.

No. Parsing and serialisation both run in your browser, so configuration files containing credentials and internal hostnames never leave your device at any point, not even while the conversion runs in the background.

Yes. There is no signup, no watermark and no size limit beyond what your browser can handle on your own hardware, and every option is open from the first visit onward.