Format Kubernetes YAML — Multi-Doc Manifests

Pretty-print Kubernetes manifests in your browser, including multi-document YAML separated by ---. Choose indent 2 or 4. Comments are dropped by the js-yaml round-trip. Not a generic YAML beautifier — for that use beautify YAML.

Loading…
Kubernetes YAML formatter — multi-doc manifests
Normalize indentation on Kubernetes manifests before review or paste into tickets. Supports multi-document streams; not a generic YAML beautifier.

Developer notes

• Pretty-prints multi-document Kubernetes manifests. • Auto-format on paste/upload/sample; manual edits use the Format button (⌘↵). • YAML # comments are dropped by js-yaml — a soft warning appears when the input likely had comments. • Pair with validate-kubernetes for kind-aware checks.

Options

Indent width
Spaces per indentation level in the dumped YAML (2 or 4).

When teams pick this route

• Clean up hand-edited Deployment/Service snippets before a PR. • Normalize multi-doc kubectl get -o yaml dumps for reading. • Align indent 2 vs 4 across pasted examples. • Pair with validate Kubernetes for structural checks.

Worked examples

Compact Deployment → indented

Before

apiVersion: apps/v1 kind: Deployment metadata: name: web labels: {app: web} spec: replicas: 2 selector: matchLabels: {app: web} template: metadata: labels: {app: web} spec: containers: - name: web image: nginx:1.27 ports: - containerPort: 80

After format

apiVersion: apps/v1 kind: Deployment metadata: name: web labels: app: web spec: replicas: 2 selector: matchLabels: app: web template: metadata: labels: app: web spec: containers: - name: web image: nginx:1.27 ports: - containerPort: 80

Multi-document stream preserved

Before

apiVersion: v1 kind: ConfigMap metadata: name: app-config data: LOG_LEVEL: info --- apiVersion: v1 kind: Service metadata: name: web spec: selector: app: web ports: - port: 80

After format

apiVersion: v1 kind: ConfigMap metadata: name: app-config data: LOG_LEVEL: info --- apiVersion: v1 kind: Service metadata: name: web spec: selector: app: web ports: - port: 80

Navigate related Kubernetes tools

Validate structure with validate Kubernetes, format Helm values via format Helm values, or open the Kubernetes hub. For generic YAML see beautify YAML.

Kubernetes formatter FAQ

Multi-doc YAML layout

When should I use beautify YAML instead?

Use beautify YAML for generic YAML (Compose, CI configs, data files). Use format Kubernetes when you specifically want multi-doc Kubernetes manifests pretty-printed in this cluster.

Are comments preserved?

No. js-yaml parse + dump drops comments. Keep a copy if you rely on inline documentation.

Does it run kubectl or apply to a cluster?

No. Formatting is entirely in-browser. Nothing is sent to a cluster or API server.

What is the size limit?

512 KB per paste. Split large multi-doc dumps before formatting.

Kubernetes

Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.

Explore other tool categories

Minify

Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.

Beautify

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

Unminify

Expand minified or compressed code — unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats when debugging or reviewing.

Conversion

Transform data between JSON, YAML, XML and CSV locally — no server uploads.

CSS preprocessors

Compile SCSS or LESS to standard CSS in the browser — pair with beautify or minify for a full stylesheet workflow.

JSON Tools

Validate, format, diff and explore JSON payloads — complementary to minifiers and converters.

SVG Tools

Preview, optimize with SVGO, export Data URI, resize, beautify, convert to JSX and validate SVG — all in your browser.

DevOps & Infra

Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.

CI/CD

GitHub Actions and GitLab CI — format YAML and check workflow/job structure in your browser.

Logs & observability

Line-oriented JSON/NDJSON and Nginx/Apache access logs — format, filter, validate, and CSV/TSV.

Networking / IP

CIDR, subnets, and IPv4/IPv6 helpers — in your browser.

Security & tokens

JWKS, X.509 certificates, and secrets scan — browser-local.

API & schemas

OpenAPI tools to format, validate, and lint your specs.

Encoding

Encode or decode Base64, URL components and HTML entities — client-side only.

Developer utilities

Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugify, number bases, case, text diff, and chmod — all client-side.

Text & Markdown

Count words, build Markdown TOCs, and clean line lists — all in your browser.

Serialization

Serialize and deserialize PHP data structures beside JSON workflows.