fileview.dev

Convert JSON to YAML

Convert JSON to YAML in your browser: load your JSON, choose YAML as the target, and download the result. The converter reports exactly what it could not carry across, and nothing is uploaded to a server.

Convert JSON to YAMLRuns in your browser. Nothing uploaded.

When you need this

Kubernetes, Docker Compose, GitHub Actions and Ansible all read YAML, while almost everything that generates configuration emits JSON. This conversion is the usual last step before a manifest goes into a repository, and the reason the result is reviewed by a human is that YAML is the format people are expected to edit afterwards.

How to convert JSON to YAML

Load your JSON
Drag the .json file in, paste the text, or open it straight from a URL — an API response usually arrives as a paste. Nothing leaves your browser at this or any later step.
Choose the target format
Press Ctrl+Shift+K (Cmd+Shift+K on a Mac) to open the conversion panel, then pick YAML as the target. The source and the result sit side by side.
Read the loss report
The panel shows whether the conversion is lossless for your particular data, and lists every value it had to transform. Adjust indentation, key sorting and null handling if you need to.
Take the YAML
Download the .yaml file, copy it, or open it as a new tab to keep working on it in the YAML views.

What survives the conversion

JSON to YAML cannot be lossless, because the two formats express different things. Integers beyond 2^53 lose precision, and there is no YAML spelling for Infinity or NaN.

A worked example

A string that must stay a string, and one that need not be:

{
  "port": 8080,
  "version": "1.0",
  "debug": false
}
JSON in
port: 8080
version: "1.0"
debug: false
YAML out

Privacy

The conversion runs in your browser — in a Web Worker for anything above a quarter of a megabyte, so the page stays responsive. Your data is not uploaded, not logged and not stored. There is no account, and the whole thing works offline.

Convert JSON to YAML

Questions

Why did my version number gain quotes?

Because 1.0 unquoted is a YAML float, and reading it back would give you the number 1 rather than the string "1.0". The quotes are what preserve the value you started with. Anything whose unquoted form a YAML parser would interpret as a different type is quoted for the same reason.

Is converting JSON to YAML lossless?

No, and no tool can make it so. Integers beyond 2^53 lose precision, and there is no YAML spelling for Infinity or NaN. The converter lists every affected value rather than silently dropping it.

Is my JSON uploaded to a server?

No. The file is read and converted by your browser. Nothing about its contents is sent anywhere, which you can verify in your browser’s network panel or by using the tool with the network disconnected.