Skip to content
Sealpaste

JSON to YAML Converter

Turn JSON into readable YAML for Kubernetes, Compose, CI pipelines or OpenAPI specs. Switch direction to go back.

Direction
Indent

Input JSON

YAML

How to use it

  1. 1Paste JSON on the left, or open a .json file.
  2. 2Choose 2 or 4 spaces for the YAML indent.
  3. 3Copy or download the YAML. Use "Swap" to edit the YAML and convert it back.

Private by design

Everything runs in this browser tab. Your input is never uploaded, logged or saved on a server, and there are no public "recent" pages. Close the tab and it's gone.

How we keep it private

Examples

API config to YAML

Input

{"server": {"port": 8080, "hosts": ["a.example.com", "b.example.com"]}, "debug": false}

Output

server:
  port: 8080
  hosts:
    - a.example.com
    - b.example.com
debug: false

How values are written

Strings are left unquoted when YAML can read them back as the same string, and quoted when they would otherwise turn into something else ("true", "1.0", "null", values starting with special characters). That includes "yes", "off" and "0755", which older YAML 1.1 parsers such as PyYAML read as booleans and numbers.

Numbers are written exactly as in the JSON, including 64-bit integers that JavaScript would normally round.

Frequently asked questions

Is all JSON valid YAML?

Practically yes: YAML 1.2 is a superset of JSON, so a YAML parser can read JSON. Converting makes it readable: block style, no braces, no quotes where they are not needed.

Will comments survive?

JSON has no comments, so there are none to keep. When converting YAML to JSON, comments are dropped because JSON cannot hold them.

Is my config uploaded anywhere?

No. Conversion runs in your browser. Kubernetes manifests, CI files and .env-style configs often hold secrets; they never leave your machine here, and the page warns you if it spots any.