JSON to YAML

Convert JSON into readable YAML for configuration files, deployment manifests and developer workflows.

Ad space — place your AdSense unit here after approval.
Your result will appear here.

JSON to YAML online

Convert JSON into clean, block-style YAML — two-space indentation, lists as dash items — for configuration files, CI pipelines and anywhere YAML is the house format.

Quick answer: Use JSON input when preparing a configuration or manifest that is easier to read as YAML.

How to use this tool

  1. Paste your JSON into the input box.
  2. Click Run Tool. Objects become indented key blocks and arrays become dash lists; strings that YAML would misread are quoted automatically.
  3. Copy the YAML from the result panel.

Common uses

Rewriting JSON configuration as readable YAML for Kubernetes, GitHub Actions or Ansible, turning API responses into fixtures you can annotate, and drafting config examples for documentation.

How it works

The writer uses block style throughout: nested objects indent by two spaces, arrays become - items, and objects inside arrays open on the line below the dash. Scalars are written bare when they are safe — letters, digits, spaces, dots, dashes and underscores — and double-quoted JSON-style when they are not, so a string like yes or 1.2.3 cannot be misread by a YAML parser. null, booleans and numbers are written as YAML natives.

Worked example

Paste:

{ "name": "Ana", "roles": ["admin", "editor"], "active": true }

and the result is:

name: Ana
roles:
  - admin
  - editor
active: true

Privacy and browser processing

Your JSON is converted in your browser with JavaScript — it is never uploaded or stored.

Frequently asked questions

Will the YAML mean exactly the same as the JSON?

For ordinary data, yes. One exception to watch: a string made only of digits (like "123") is written bare, and a YAML reader will hand it back as a number. Quote-sensitive IDs are safer kept in JSON, or checked after conversion.

How are empty objects and arrays handled?

An empty container has nothing to indent, so it collapses to a bare key with no block under it. If a consumer expects an explicit {} or [], add it by hand after conversion.

What if my JSON key contains a colon?

Keys are written verbatim, and a colon inside a YAML key breaks the mapping. Rename keys containing ":" (or spaces followed by colons) before converting.

Does it preserve key order?

Yes. Keys are written in the order they appear in the parsed JSON, which for typical inputs is the order in your pasted text.

Is my JSON uploaded?

No. The conversion runs in your browser; nothing is sent anywhere.

Related tools

Ad space