YAML to JSON Converter

Convert between YAML and JSON.

Free online YAML to JSON converter

This converter turns YAML into JSON and JSON back into YAML entirely in your browser. YAML is the human-friendly format behind config files for Docker, Kubernetes, GitHub Actions, and countless CI pipelines, while JSON is the format most APIs and programs actually consume. Because both describe the same data, you can move a document between them without losing structure — paste your source, pick a direction, and the result updates live. Nothing you convert ever leaves your device.

How to convert YAML and JSON

  1. Choose a direction — YAML → JSON or JSON → YAML.
  2. Paste or type your document into the input box on the left.
  3. Watch the output appear instantly, and read the status line for a Converted confirmation or a clear error.
  4. Pick 2 or 4 spaces of indentation for the result.
  5. Use Copy to grab the output, Swap to send it back through in the opposite direction, or Clear to start over.

YAML vs. JSON

YAML favours readability with indentation and no braces, making it pleasant to edit by hand and to comment. JSON is stricter and more compact, which makes it ideal for transport and for parsing in almost any language. A round trip drops YAML comments, since JSON has no equivalent, but every value is preserved. Need to tidy the JSON afterwards? Try the JSON formatter. To turn a JSON array of records into a spreadsheet, use the JSON to CSV converter.

Private and browser-based

Every conversion runs locally with no network requests, so this is a safe, fast way to reformat sensitive configuration such as tokens, environment files, and deployment manifests without exposing them to a server.

Frequently asked questions

What does this YAML to JSON converter do?

It converts YAML into JSON, and JSON back into YAML, right in your browser. Pick a mode, paste your document, and the result appears live as you type. YAML and JSON describe the same data model, so the conversion preserves your keys, values, lists, and nesting exactly.

Is my data uploaded to a server?

No. All parsing and conversion happen locally in your browser using JavaScript. Nothing you paste is ever sent, stored, or logged, so it is safe to convert private config files, secrets, and internal API payloads.

Why am I getting a parse error?

YAML is indentation-sensitive, so the most common causes are inconsistent indentation, tabs used instead of spaces, or missing colons and quotes. For JSON the usual culprits are trailing commas, single quotes, and unquoted keys. The status line shows the parser's own error message so you can jump straight to the problem.

Can I choose the indentation?

Yes. Use the indent selector to output with either 2 spaces (the most common convention) or 4 spaces. The setting applies to the pretty-printed JSON as well as the generated YAML, and re-running is instant.

Does converting change my data?

No. Only the formatting changes. The document is parsed into an in-memory value and re-serialized, so numbers, strings, booleans, null, arrays, and objects are all preserved. Comments are the one exception — YAML comments are dropped because JSON has no equivalent.