All tools

JSON ↔ YAML

Encoding

Convert between JSON and YAML in either direction. Pretty-print or minify the output, copy with one click. All conversion runs in your browser.

JSONYAML
JSON input
YAML output
apiVersion: apps/v1
kind: Deployment
metadata:
  name: portfolio
  namespace: portfolio
spec:
  replicas: 2
  selector:
    matchLabels:
      app: portfolio
  template:
    metadata:
      labels:
        app: portfolio
    spec:
      containers:
        - name: portfolio
          image: traagel/portfolio-page:0.5.1
          ports:
            - containerPort: 3000

Powered by the standard js-yaml library. YAML output uses 2-space indentation and disables anchors / references.