Options
Kubernetes YAML or JSON
Paste YAML or drop a file
Formatted

    Paste a Kubernetes manifest on the left and a cleanly formatted version appears on the right as you type, with consistent indentation, lists in the same style kubectl uses, and fields in the familiar order: apiVersion, kind, metadata, then spec. Comments, anchors, multi-line strings, and multiple documents separated by --- are kept. Turn on Remove cluster fields to strip the noise from kubectl get -o yaml output so it can be saved and re-applied. The formatter also checks for the mistakes that make kubectl apply fail, like a number where Kubernetes expects a string or a selector that doesn't match its pods. It also converts between YAML and JSON. Nothing leaves your browser.

    How to format Kubernetes YAML

    1. Paste one or more manifests, kubectl get output, or helm template output into the left pane. You can also open or drop a .yaml, .yml, or .json file.
    2. Pick the indentation and list style. kubectl style puts the - of a list at the same indent as its key, which is how kubectl and most Kubernetes docs write YAML.
    3. Choose a field order. Kubernetes order sorts the top level, metadata, spec, pod spec, containers, and ports into their conventional order and leaves everything else as written.
    4. Read the messages under the panes and click one to jump to that line.
    5. Copy the result, or download it as .yaml. Switch to JSON to get JSON instead.

    What "Remove cluster fields" takes out

    Objects read back from a cluster carry fields that Kubernetes manages itself. Applying them again causes conflicts or noisy diffs, so this option removes them:

    FieldWhy it's removed
    statusWritten by controllers, never by you
    metadata.managedFieldsServer-side apply bookkeeping, often hundreds of lines
    metadata.uid, resourceVersion, generation, creationTimestamp, selfLinkIdentify one specific copy in one cluster. Applying them elsewhere fails or conflicts
    kubectl.kubernetes.io/last-applied-configurationA JSON copy of the previous apply, stored as an annotation
    deployment.kubernetes.io/revisionRollout counter maintained by the Deployment controller
    spec.clusterIP on ServicesAssigned by the cluster. Kept when set to None for headless Services
    creationTimestamp: null in pod templatesAn empty placeholder kubectl adds

    Mistakes the checker catches

    ProblemExampleWhat happens
    Number as an env valuevalue: 8080kubectl rejects it: env values must be strings. Write value: "8080"
    Unquoted yes, no, on, or offvalue: onKubernetes reads it as the boolean true and rejects it as a string. Write "on"
    Non-string label, annotation, or ConfigMap valueversion: 2Rejected. Quote it: "2"
    Selector doesn't match pod labelsmatchLabels: {app: web-frontend} with pods labeled app: webThe Deployment is rejected because it could never find its own pods
    Multi-port Service without port namesTwo entries under ports with no nameRejected
    Invalid names and labelsname: My_AppRejected. Names use lowercase letters, digits, and dashes
    Duplicate keys, tabs, bad indentationTwo image: lines in one containerThe YAML is invalid or silently drops a value
    Image without a tag or with :latestimage: nginxWorks, but every node can pull a different version
    No resource requests, limits, or probesA container with only name and imageWorks, but the pod can be evicted first or receive traffic before it's ready

    Why Kubernetes YAML breaks so easily

    YAML uses indentation for structure, so one extra space moves a field into the wrong object. Kubernetes reads YAML with a YAML 1.1 parser, where yes, no, on, and off are booleans, while many editors and linters follow YAML 1.2, where they're plain text. That mismatch is why a value that looks fine in your editor can be rejected by the cluster. Quoting any value that should stay text avoids the whole problem.

    Frequently asked questions

    Does formatting change what my manifest does?

    No. Indentation, list style, field order, and quoting are cosmetic, and Kubernetes reads the same object either way. Values, comments, and multi-line strings are kept exactly. Only Remove cluster fields changes content, and only fields that Kubernetes manages itself.

    How do I clean up kubectl get -o yaml output?

    Paste the output and turn on Remove cluster fields. Status, managedFields, uid, resourceVersion, creationTimestamp, and the last-applied-configuration annotation are removed, leaving a manifest you can commit to Git or apply to another cluster.

    Can I convert Kubernetes JSON to YAML?

    Yes. Paste the JSON, for example from kubectl get -o json, and the YAML appears on the right. A kind: List is split into separate documents separated by ---. Switch the output to JSON to convert YAML to JSON instead.

    Should lists be indented under their key?

    Both styles are valid YAML and mean the same thing. kubectl and the official Kubernetes docs put the dash at the same level as the key, which saves indentation in deeply nested specs. Some teams and tools like Prettier indent lists. Pick whichever matches your repository.

    Does it work with Helm charts?

    It formats the rendered output of helm template. Chart template files with {{ }} expressions aren't valid YAML until Helm renders them, so render first and then paste the result.

    Is my manifest sent anywhere?

    No. Parsing and formatting happen in your browser, so secrets, internal hostnames, and image names stay on your machine.

    Our Full Dev Tool Library

    Flipper File