YAML Formatter & Validator

Last updated:

Paste YAML, normalize its indentation or convert it to JSON — all in your browser, nothing uploaded. No anchors, tags, or multi-document streams — see "How it works" for the full scope.

How it works

  • Format re-serializes your YAML with a consistent 2 or 4-space indent — useful when a file mixes indentation widths or came from a source that isn’t consistent about it.
  • To JSON converts the parsed document straight to pretty-printed JSON — the most common reason people reach for a YAML tool (checking what a Kubernetes manifest or CI config actually resolves to).
  • Handles block mappings and sequences (including the common “list of objects” shape), flow collections ([a, b], {x: 1}), quoted and plain scalars with automatic type detection (string/number/boolean/null), comments, and literal block scalars (|, |-, |+).

What’s deliberately not supported (and reported as a clear error rather than silently guessed): anchors and aliases (&name / *name), tags (!!str, !Ref), folded block scalars (>), and multi-document streams (more than one ---). A scalar value must fit on a single physical line — for anything that needs to span lines, use a literal block scalar (|) instead of relying on implicit line folding. Merge keys (<<:) are parsed as a literal key rather than performing the merge.

Runs entirely in your browser — nothing you paste here is uploaded, logged, or stored. No autosave, by design, since config YAML often contains credentials or internal hostnames.

🔧 Also try: JSON Formatter → 📰 Also try: Markdown Front-matter Formatter →