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.
Developer notes
• Uses js-yaml loadAll + dump — YAML comments and some stylistic details are lost. • Each document root must be a mapping (object), not an array or scalar. • Empty / null documents in a stream are skipped. • Max input 512 KB. • For non-Kubernetes YAML use beautify YAML.
Options
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
After format
Multi-document stream preserved
Before
After format
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.
More Kubernetes tools in this cluster
Looking for converters, encoders, formatters, and minifiers in one place? Developer tools hub Open the curated developer tools catalogue.