Convert JSON to YAML

Paste JSON, or drop a .json file, and download it as YAML. Nothing is sent anywhere.

Convert JSON to YAML

Drop your JSON file here

Up to 20MB per file. Stays on this device.

Nothing is sent anywhere. Turn off your Wi-Fi and this page still works - try it.

How it works

  1. Drop or choose a .json file, or paste JSON directly into the text box.
  2. Review the YAML preview.
  3. Download the result as a .yaml file.
Example output

Input

{
  "name": "Widget",
  "price": 9.5,
  "tags": ["hardware", "sale"]
}

Output

name: Widget
price: 9.5
tags:
  - hardware
  - sale

A JSON object with a nested array converted into YAML.

Frequently asked questions

Is my JSON sent anywhere?

No. Pasted JSON and uploaded files are both read and converted entirely on your device - nothing is sent to a server. Turn off your Wi-Fi after the page loads and it still works. This page loads 10KB of JavaScript, gzipped - about what your browser's network tab will show for this page's own scripts.

What JSON shape does this expect?

Any valid JSON value - an object, an array, or even a bare string or number - all convert to their equivalent YAML representation.

Does converting to YAML and back produce the exact same JSON?

Yes, for any JSON this tool actually accepts. YAML is a superset of JSON’s own data model (objects, arrays, strings, numbers, booleans, null), so nothing about the value itself is lost - only the formatting changes, from braces and commas to YAML’s indentation-based syntax.

How are special number values like NaN or Infinity handled?

They can’t come up here - JSON.parse itself rejects NaN/Infinity as invalid JSON before this tool ever sees them, unlike YAML to JSON (the reverse tool), where YAML’s own .nan/.inf syntax has to be handled explicitly on the way out to JSON.

Does this tool preserve key order?

Yes - object keys appear in the YAML output in the same order they appeared in the source JSON, matching how JSON.parse itself preserves insertion order for string keys.

Files are processed locally in your browser and never uploaded. Read more on the privacy page.