Home / YAML Tools / YAML Sort Keys
YAML Tools

YAML Sort Keys

Parse YAML, alphabetize object keys at every mapping level, then serialize readable YAML locally.

ReadyMapping/object keys are sorted recursively. Array item order is intentionally preserved.

YAML sort-policy preview

Choose direction, depth and case policy, then inspect what the sorter should preserve. Sorting mappings is not the same task as extracting key paths.

—Mapping keys seen
—Comment lines
—Sequence lines
—Sort policy
Ready.
Policy checkDetected / selectedPreserve?Reason

Sequence order is normally meaningful and should not be silently alphabetized.

Before converting YAML

Format and validate first, inspect the parsed structure, then convert only after deciding how the target format should represent arrays, nested mappings and scalar types.

Syntax is not application validity

A YAML document can parse successfully and still be invalid for Kubernetes, Docker Compose, GitHub Actions, CI/CD, OpenAPI or another application schema.

Search by task, tool name, or category. Press Esc to close.
Start typing to find a tool.