JSON to YAML Converter

Convert JSON to YAML instantly for Kubernetes, Docker Compose, and CI/CD configs. Smart quoting, literal block scalars, sort keys, and document marker options. Free and private — all processing happens in your browser.

Private ● Runs entirely in your browser Your text never leaves your device.No account required.No data uploaded.Nothing stored unless you choose to save it.
Indent
Sort keys

Common Questions

What is the difference between JSON and YAML?

Both are data serialization formats that represent the same hierarchical data. JSON uses explicit punctuation: braces for objects, brackets for arrays, commas as separators, and quotes around all strings. YAML uses indentation and minimal punctuation: colons for key-value pairs, dashes for list items, and no mandatory quotes. YAML is often easier to read in configuration files; JSON is more compact and universally supported in APIs and tools.

Why would I convert JSON to YAML?

YAML is the standard format for many configuration and infrastructure tools: Kubernetes manifests, Docker Compose files, Ansible playbooks, GitHub Actions workflows, and CI/CD pipeline definitions all use YAML. If you have data in JSON from an API response, a config export, or a database, converting it to YAML makes it ready for these tools with no manual reformatting.

Why would I convert YAML back to JSON?

JSON is the lingua franca of APIs and most programming languages. If you have a YAML config file and need to pass it to an API, validate it with a JSON Schema, or process it with a language that lacks a YAML library, converting to JSON first is the practical approach. The converter handles this direction just as easily.

Is YAML indentation mandatory?

Yes. In YAML, indentation using spaces (never tabs) defines the document structure. A single misplaced space changes the meaning of the document or causes a parse error. Two spaces per level is the most common convention. The converter always produces correctly-indented output; if you edit the YAML by hand, be careful to keep indentation consistent.

Why are some string values wrapped in quotes in the YAML output?

YAML has reserved words and implicit type coercion rules. The unquoted values true, false, null, yes, no, on, and off are interpreted as booleans or null by most parsers. Values that look like numbers (e.g., 10001) would be parsed as integers. The converter automatically wraps these in double quotes so the string type is preserved exactly as it was in the JSON.

What does the "Flow arrays" option do?

When enabled, arrays that contain only scalar values (strings, numbers, booleans, nulls) are serialized inline in flow style: [a, b, c] instead of the block style with each item on a separate line. This produces more compact output for lists of tags, IDs, or simple values. Arrays containing objects or nested arrays are always serialized in block style regardless of this setting.

What does the "--- marker" option do?

The triple-dash marker (---) is the YAML document-start indicator. Most YAML parsers do not require it, but Kubernetes, some Helm charts, and tools that process multi-document YAML streams expect or prefer it. Enabling this option prepends --- on its own line before the YAML content.

Is my data private when I use this tool?

Yes. All conversion happens entirely in your browser using JavaScript. Your data never leaves your machine — there is no upload, no server-side processing, and no logging of any kind. This makes the tool safe to use with internal configuration files, credentials structures, or any sensitive data.