Code · Made a little simpler

YAML to Canonical Normalizer

Sort YAML mapping keys, normalize indentation and quoting, and keep numeric values and sequence order in a repeatable YAML export.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Your text and files stay in this browser.

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

YAML to Canonical Normalizer: how to use it

  1. Paste or open one YAML 1.2 data document, or load the worker configuration example.
  2. Select Normalize YAML. Review sorted keys, two-space indentation and expanded aliases.
  3. Compare the normalized output with another version or download canonical.yaml.

Limits and notes

262,144 input characters, 40 output levels, 24,000 expanded nodes and 1,048,576 output characters. Supports YAML 1.2 core data with string mapping keys. Comments, original scalar styles and anchor names are omitted from the normalized export.

How your privacy works →

YAML to Canonical Normalizer: common questions

Does sorting keys change list order?

Mapping keys sort by their decoded string. Sequence items keep their original order, including sequences nested inside mappings.

How do aliases and tags work?

Acyclic aliases expand to repeated values. Cycles, custom tags, duplicate keys and non-string mapping keys produce an error.

Does the output use YAML's tagged canonical presentation?

The output uses a stable block layout with double-quoted strings, core numeric values and two-space indentation.

Guides