YAML Toolkit

DEVOPS TOOL

YAML Toolkit

Validate and format YAML, convert YAML ↔ JSON, and get useful guidance when the wrong operation is selected.

YAML & JSON workspace

Paste your configuration below. Runbookery detects the likely input type before each operation and keeps the conversion in your browser.

Client-side processing
Your YAML/JSON content is not submitted to Runbookery.
Detected inputWaiting for input
Ready.Paste YAML or JSON to begin.

What the toolkit checks

The toolkit uses a real YAML parser rather than regular-expression checks. It can report parser errors with line and column information when available, format parsed YAML, and convert between YAML and JSON.

Wrong button? The tool should help, not punish you.

If you paste YAML and click JSON → YAML, the toolkit first requires strict JSON. If JSON parsing fails but the same input is valid YAML, it tells you that the content appears to be YAML and suggests YAML → JSON. Empty and whitespace-only input is handled before parsing.

JSON and YAML overlap

JSON is compatible with YAML syntax, so input detection follows a predictable rule: strict JSON is classified as JSON first; otherwise the toolkit attempts YAML parsing. This avoids pretending that a JSON-specific operation succeeded on merely YAML-compatible text.

Multiple YAML documents

Documents separated with --- are supported. YAML → JSON returns a JSON array when multiple documents are present. Formatting preserves them as separate YAML documents.

Common YAML problems

  • Indentation: nested mappings and sequences must line up correctly.
  • Tabs: indentation should use spaces; parser errors help locate malformed indentation.
  • Duplicate keys: duplicate mapping keys can be ambiguous and are treated as validation errors by the parser configuration used here.
  • Quoting: quote values when punctuation or scalar interpretation could make intent unclear.
  • Anchors and aliases: valid YAML features are parsed, but conversions may expand or normalize representation.

Kubernetes YAML example

apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  LOG_LEVEL: info
  FEATURE_FLAG: "true"

The toolkit validates YAML syntax, not Kubernetes API semantics. A syntactically valid manifest can still contain an invalid Kubernetes field, API version or value. Kubernetes-specific manifest validation belongs in a separate tool.