JSON input

or drop a file here, or paste code below
JSON input

YAML output

YAML output

Files never leave your browserHow?

Paste or open JSON and get clean, readable YAML for configuration files, Kubernetes manifests, Docker Compose or OpenAPI specs. Nothing is uploaded.

How it works

  1. Open or paste JSON

    Paste JSON, open a .json file, load one from a URL or try the sample.

  2. Adjust the style

    Choose 2 or 4 spaces, line folding, quoting, sorted keys and whether repeated objects use anchors.

  3. Download or copy

    Download the .yaml file, copy it, or convert it back with YAML → JSON.

Features

  • Safe quoting

    Strings that some YAML readers would treat as something else, like yes, on, 1e3 or 08, are always quoted, so the values stay strings everywhere.

  • Readable multi-line text

    Strings with line breaks are written as | blocks instead of long escaped lines.

  • Style options

    Indent with 2 or 4 spaces, fold long lines at 80 or 120 characters or never, quote only when needed or always with single or double quotes, and sort keys alphabetically.

  • Exact values

    Key order is kept and long integers are written exactly. Repeated objects can be written once with &anchor and *alias.

  • Live conversion

    The YAML updates as you type; invalid JSON is reported with line and column.

Limits & privacy

JSON files can be up to 50 MB. Files above 5 MB are converted from the file without loading them into the editor.

Comments cannot be added because JSON has none. JSON Lines files are written as a YAML list. See the privacy page.

FAQ

How do I convert JSON to YAML?

Paste the JSON or open the file. The YAML appears as you type; press Download .YAML or Copy.

Can I convert a Swagger or OpenAPI JSON file to YAML?

Yes. Open the swagger.json or openapi.json file and download the YAML. The structure and key order stay the same.

Why are some values in quotes?

Values like yes, no, on or 08 would be read as booleans or numbers by YAML 1.1 tools, so they are quoted to stay strings.

Is the YAML valid for Kubernetes and Docker Compose?

Yes. The output is standard YAML 1.2 that kubectl, Docker Compose and other tools read. Use 2 spaces, the usual style for these files.

Can I use it as a JSON to YAML formatter without the command line?

Yes. It replaces a quick yq or script call: open the file, choose the style and download the result.

Is this JSON to YAML converter online free and private?

Yes. It is free and works in your browser; your data never leaves your device.

Related tools