YAMLTools logo
JSONYAML

JSON to YAML Converter Online

Paste JSON and get clean, readable YAML instantly — free, online and without signing up. The converter keeps your keys in their original order, writes 2 or 4 spaces as you prefer, keeps big integers digit by digit and quotes the strings that older YAML parsers would misread: "no" would become false (the “Norway problem”), "0755" an octal number and "2024-01-15" a date. Ideal for moving configs to Kubernetes, GitHub Actions or Ansible, or for reading a noisy API response. Nothing leaves your browser.

or paste your own below

YAML Converter - Convert Between Formats10 formats

Free YAML converter online. Convert YAML to JSON, XML, TOML, INI, Properties, CSV, and more. Also convert INI to YAML, TOML to YAML, and Properties to YAML. With automatic format detection.

Input (JSON)

JSON
Loading editor…

Output (YAML)

Result will appear here

When you'd convert JSON to YAML

Real-world scenarios where this conversion is the right move.

Migrate to YAML-first config

Kubernetes, GitHub Actions, GitLab CI, Helm and Ansible all prefer YAML. Convert legacy JSON configs in one step.

Make API responses readable

Paste any JSON API response to inspect deeply-nested structures with proper indentation and no quote noise.

Generate docs from package.json

Convert package.json, tsconfig.json or any tool config to YAML for documentation or hand-editing.

Advertise here · Reach thousands of developers

JSON vs YAML — what changes

Quick reference for the structural differences between both formats.

AspectJSONYAML
ReadabilityQuotes around every key, braces and commas everywhere.Plain keys, indentation-based hierarchy, no commas.
CommentsNot allowed.YAML lets you annotate keys with # comments.
StringsAlways quoted.Quoting is optional — only required for special characters.
ReuseEvery value is fully written.YAML supports anchors (&) and aliases (*) to deduplicate values.

Frequently asked questions

Does the converter preserve types?

Yes. Numbers stay numeric, booleans stay booleans, null stays null. Strings are written without quotes when that is safe, and quoted when a YAML parser could read them as something else.

Why are some of my strings in quotes?

Because YAML 1.1 parsers (PyYAML, Ansible, Go yaml.v2) read unquoted no, yes, on, off, Y and N as booleans, 0755 as an octal number, 22:22 as a base-60 number and 2024-01-15 as a date. Quoting them keeps the exact string from your JSON, whatever parser reads the YAML.

Does it keep the key order and let me choose the indentation?

Yes. Keys keep the order they have in your JSON (numeric keys included), and you can pick 2 or 4 spaces next to the result.

Can it handle nested JSON arrays?

Yes. Arrays render as YAML sequences with proper indentation, and nested objects render with the right level of nesting.

Is the YAML output valid for Kubernetes?

The output is valid YAML 1.2, which Kubernetes uses. If your JSON came from kubectl get -o json, the converted YAML is ready to kubectl apply.

What about JSON with comments (JSON5/JSONC)?

Strip comments before pasting — standard JSON does not allow them. The converter expects valid RFC 8259 JSON.

Other conversions

Hop into another conversion that shares one of these formats.