Beautify YAML Online — Free YAML Beautifier

Beautify YAML configs with consistent indentation. Note: parse-based beautify cannot preserve # comments (see FAQ).

Loading…
YAML Beautification
Beautify YAML online.

Features

Format with indent control (comments not preserved on parse).

Beautify YAML

Format with indent control (comments not preserved on parse).

Basic example

YAML source

apiVersion: apps/v1 kind: Deployment metadata: name: checkout-api labels: app: checkout spec: replicas: 3 selector: matchLabels: app: checkout template: metadata: labels: app: checkout spec: containers: - name: api image: registry.example/checkout:2.4.1 ports: - containerPort: 8080

Beautified YAML

apiVersion: apps/v1 kind: Deployment metadata: name: checkout-api labels: app: checkout spec: replicas: 3 selector: matchLabels: app: checkout template: metadata: labels: app: checkout spec: containers: - name: api image: registry.example/checkout:2.4.1 ports: - containerPort: 8080

Options

Indent Width
2 or 4 spaces for beautify, unminify, and parse-based minify.
String Quotes
Minimal or double-always quoting on dump.
YAML Style
Readable (80 col) or tight (compact) dump.

YAML conversion helpers

Use JSON → YAML, YAML → JSON, YAML → XML or YAML → CSV for format conversion.

FAQ — Beautify YAML

Beautification

Why did my comments disappear?

js-yaml parse drops # comments — documented limitation (TD-021).

Minify instead?

Use YAML minifier with removeComments: false to keep # lines.

Looking for converters, encoders, formatters, and minifiers in one place? Developer tools hub Open the curated developer tools catalogue.

Other actions for this language