{ } JSON to YAML
Format JSON About
1
Decode JWT

Left

Right


      
Keyboard Shortcuts
Ctrl+Shift+FFormat / Beautify JSON
Ctrl+Shift+MMinify JSON
Ctrl+Shift+SSort Keys
Ctrl+ZUndo
Ctrl+Y / Ctrl+Shift+ZRedo
Ctrl+FSearch (Tree Viewer)
?Open this shortcuts list
JWT Decoder
Load JSON from URL

The URL must support CORS or be a public API endpoint.

Filter Fields

Uncheck fields to hide them from the tree view. Arrays appear once.

Drop JSON file here

JSON to YAML Converter Online

Paste JSON and export it as YAML for config files. The conversion runs in your browser, so nothing you paste is uploaded.

How to convert JSON to YAML

  1. Paste your JSON into the editor. It must be valid, so check the status bar.
  2. Open the Export menu and choose YAML.
  3. A file named data.yaml downloads.

For example, {"name":"app","ports":[80,443]} becomes:

name: app
ports:
  - 80
  - 443

What the output looks like

  • Nesting uses 2-space indentation.
  • Numbers, booleans, and null keep their types.
  • Empty arrays are written as [].
  • Strings that contain a colon, #, quotes, a line break, or leading or trailing spaces are double-quoted so they stay strings.

Review the result before committing it. YAML has many dialects, and strings such as yes or on can be read as booleans by some parsers.

Where YAML is used

YAML is the usual format for Kubernetes manifests, GitHub Actions workflows, Docker Compose files, OpenAPI specifications, and many CI and application configs. JSON is a good starting point for these when your data comes from an API or a generator.

JSON vs YAML: which to use

JSON is strict and unambiguous, which makes it ideal for APIs and machine-to-machine data. YAML trades that strictness for readability: no braces or quotes for most values, and it supports comments, which JSON does not. That is why configuration files are usually written in YAML while the same data travels between services as JSON. YAML is a superset of JSON in most parsers, so valid JSON can often be pasted into a YAML file unchanged, but converting it gives you the readable form.

Other formats

The Export menu also produces CSV, TOML, and SQL INSERT statements, and formatted or minified JSON. This tool converts from JSON to YAML; it does not convert YAML back to JSON. To tidy your JSON first, use Format or see the JSON Prettier.

More JSON tools

  • Format JSON: formatter, validator, tree viewer and diff.
  • JSON Prettier: pretty print JSON and repair invalid JSON.
  • JSON Validator: check JSON syntax and find errors.
  • JSON Diff: compare two JSON documents.
  • JSON to CSV: convert JSON to CSV (and CSV back to JSON).
  • JSON Minifier: minify JSON and remove whitespace.
  • JWT Decoder: decode and inspect JSON Web Tokens.
  • Common JSON Errors: causes and fixes for invalid JSON.

Frequently asked questions

How do I convert JSON to YAML?

Paste valid JSON, open the Export menu, and choose YAML. A data.yaml file downloads.

Can I convert YAML to JSON?

Not with this tool. It exports JSON to YAML only.

Which indentation does the YAML use?

Two spaces per level.

Are types preserved?

Yes. Numbers, booleans, and null stay as such, and strings with special characters are quoted.

Is my data uploaded?

No. The conversion runs entirely in your browser.

© 2026 Format JSON · v1.2.0 · Free & open source · 100% client-side · JSON Prettier · Changelog · JWT Decoder · Privacy Policy · Terms of Service