Skip to main content
Kubernetes Tools

Kubernetes Manifest Formatter

Paste a Kubernetes YAML manifest and get it cleanly re-formatted with consistent indentation.

Paste your Kubernetes manifest below - this tool re-parses and re-serializes it with clean, consistent YAML formatting.

This never guesses at malformed YAML - if the input can't be parsed, it reports the error clearly rather than producing corrupted output.

What Does This Tool Do?

It parses your YAML manifest and re-outputs it with consistent indentation and spacing - useful for cleaning up a manifest that's been edited by hand, copy-pasted from multiple sources, or generated with inconsistent formatting.

Why Use This Tool?

Kubernetes YAML is indentation-sensitive, and manifests that have been edited repeatedly (or merged from different generators) often accumulate inconsistent spacing that's hard to read, even when still technically valid.

How to Use It

  1. Paste your Kubernetes manifest.
  2. Click Format.
  3. Copy the cleanly re-formatted YAML.

Limitations

If the input isn't valid YAML, this tool reports the parse error rather than attempting to guess and "fix" it - your original input is never silently altered or corrupted.

Example

apiVersion: v1
kind: Service
metadata:
    name: web
spec:
  selector:
      app: web
  ports:
  - port: 80
    targetPort: 8080

is re-output with one consistent indentation style throughout, so nested keys line up and the structure is clear at a glance.

Why Consistent Formatting Matters for Kubernetes

  • Readable diffs: in GitOps workflows (Argo CD, Flux), every manifest change is a pull request - formatting noise hides the real change.
  • Fewer mistakes: misaligned keys silently end up in the wrong place, such as resources outside the container.
  • Merging from many sources: Helm output, kubectl get -o yaml and documentation all use different styles.

Tips

  • Separate multiple objects in one file with ---.
  • Remove server-generated fields (status, metadata.uid, resourceVersion, creationTimestamp) when saving output from kubectl get -o yaml.
  • Quote values such as "true" and "8080" in env and annotations - they must be strings.

Check the result with the Kubernetes Manifest Validator, or generate new objects with the Deployment and Service generators.

Frequently Asked Questions

Only indentation and layout change. The resources and values stay the same, although YAML comments may not be preserved.

Paste multi-document YAML separated by ---. Check the output keeps each document separate.

No. Formatting runs entirely in your browser, so manifests with internal hostnames or image names stay private.
Share this tool: