JSON to YAML converter

Free JSON to YAML converter in your browser. Paste or drop a file — nothing is uploaded.

Ads

Paste or drop .json

Nothing leaves this device. No account required.

Why convert JSON to YAML?

JSON is the default for APIs and configs in code. YAML reads better in hand-edited files and many DevOps tools (Kubernetes, CI pipelines) expect it. Convert when you need human-friendly structure without changing the data.

What changes in the output

  • Structure and values stay the same — only syntax changes
  • YAML uses indentation instead of braces and quotes
  • Comments are not preserved from JSON (JSON has none)
  • Large nested objects may produce longer YAML lines

How to convert JSON to YAML

  1. Paste JSON or drop a json file onto the converter.
  2. Confirm From is JSON and To is YAML, then click Convert.
  3. Copy or download the YAML output — processing never left your browser.

What the conversion keeps and drops

JSON objects, arrays, strings, numbers, booleans, and null map onto YAML. Keys stay keys; order of object keys follows JSON.parse (insertion order in modern engines). YAML’s indentation replaces braces and commas. JSON has no comments, so none appear in the YAML. Duplicate keys in JSON are not a thing in the JSON spec; the parser keeps the last value if a broken producer emitted them.

Formatly parses with the browser JSON parser, then emits YAML with the yaml package in this tab. Multi-document YAML (--- separators) is not produced from a single JSON value. Anchors and aliases are not invented on the way out — you get a straightforward dump, which is what you want for Kubernetes-style files you will edit by hand.

When to stay on JSON

Keep JSON if the next consumer is an API, a schema validator, or a linter that expects braces. YAML’s unquoted strings, implicit booleans (the infamous Norway problem: `NO` as false in some parsers), and indentation errors are a class of bugs JSON simply does not have. Convert to YAML when humans will maintain the file (CI, Helm values, GitHub Actions) and the tool on the other side actually wants YAML.

Do not use this page to ‘fix’ invalid JSON. Trailing commas and JSONC comments will fail parse. Pretty-print first with the JSON Formatter if you need to see the error, then convert.

Types and gotchas

Numbers remain numbers unless they were strings in JSON. `1e2` stays a number. Unicode in strings is preserved. Very large integers that JSON parsed as IEEE floats can already be rounded before YAML ever sees them — that is JSON.parse, not YAML. Nested arrays of objects become YAML lists of maps; deep indent is easy to break if you later edit in an editor that mixes tabs and spaces.

If you need the reverse path, use YAML to JSON. That direction drops YAML comments and anchors. Round-tripping JSON → YAML → JSON should match for ordinary data; it will not preserve insignificant whitespace from the original JSON.

The payload does not upload

Paste JSON or drop a .json file with the Network panel open. Parsing and stringify happen in the page. You should not see the document posted to Formatly. A download or copy of YAML is local output. App scripts loading is not your secrets leaving the tab — but treat anything you paste as already on this machine.

FAQ

Is this JSON to YAML converter free?
Yes. Formatly converts JSON to YAML in the browser at no charge and without an account.
Do you upload my JSON files?
No. Parsing and conversion run locally in your browser. Files stay on this device.
Can I switch formats after converting?
Yes. Use the From and To selectors to try other pairs, or open a related converter from the links below.

Related converters