Skip to content

Kubernetes YAML syntax check

Checks each YAML document in a manifest. It does not check the Kubernetes schema.

A --- stream is checked one document at a time. apiVersion, required fields, and unknown kinds are not validated.

Ctrl+Enter or ⌘+Enter runs this tool immediately.

Manifest

Waiting for input.

Parsing stays in this browser. Input is not uploaded or saved.

How to use this tool

  1. Paste a manifest, or load the sample Deployment and Service.
  2. Read the panel. An error names the document number and, when the parser has it, the line and column.
  3. A successful check does not format the file or decide whether Kubernetes would accept it.

Supported formats and limitations

  • Each document is parsed as YAML 1.2 with the core schema. yes and no stay strings.
  • A stream of documents is allowed here. The single-document converters still reject ---.
  • Duplicate keys inside one document are errors.
  • This does not check apiVersion, kind, required fields, types, or unknown fields.
  • The manifest is not rewritten.

Examples

Two documents

A Deployment and a Service separated by --- are two documents. Both must parse.

kind: Deployment
metadata:
  name: api
---
kind: Service
metadata:
  name: api

A tab in the second document

The error says Document 2 and the line. The first document can still be valid YAML.

kind: ConfigMap
metadata:
  name: one
---
kind: ConfigMap
metadata:
	name: two

Common errors and solutions

Document 2 has a syntax error
Use the line and column. Fix that document without assuming the first one failed.
Duplicate key
Keep one spelling of the key inside that document.
Tabs used for indentation
Replace the tab with spaces. YAML does not accept a tab as indentation.

FAQ

Does this tell me if the Deployment is valid Kubernetes?
No. It tells you whether the YAML parses. It does not apply the Kubernetes API schema.
Why can this page accept --- when the YAML converter cannot?
A converter has to produce one JSON or TOML value. This check only reports each document.
Is the manifest uploaded?
No. The check runs in your browser.

Read next

Related tools

  • YAML validator

    Check YAML syntax without converting or rewriting it. Errors include a line and column when the parser provides them, and valid input is left unchanged.

  • YAML to JSON converter

    Convert YAML configuration to readable or compact JSON in the browser. Comments are dropped, and parse errors include line and column when the parser reports them.

  • YAML to TOML converter

    Convert one YAML document to TOML in the browser. Comments are dropped, null is rejected, and multi-document streams are not merged.