Beautify YAML Online — Free YAML Formatter

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

Loading…
YAML Beautification
Beautify YAML online. Consistent indentation and spacing, processed in your browser with no uploads.

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 and unminify.
String Quotes
Minimal or double-always quoting on dump.
YAML Style
Readable dump wrapped at 80 columns, or tight (compact) dump.

YAML conversion helpers

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

FAQ about beautifying YAML

Beautification

Why did my comments disappear?

js-yaml drops # comments when it parses. This is a documented limitation.

Minify instead?

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

Is my YAML uploaded to a server?

No. Beautification runs entirely in your browser. Your YAML never leaves your device and is not stored by FastMinify.

Beautify or unminify: which should I use?

Beautify formats readable YAML; unminify restores compressed output (try the YAML unminifier). For day-to-day formatting, stay on YAML beautifier.

Can I customize indentation?

Yes. Pick 2 or 4 spaces in the Beautify options toolbar. YAML does not allow tabs for indentation.

Make code readable with consistent indentation. Beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.