Developer Tools

YAML Formatter

Turn inconsistent YAML data into a predictable representation. Choose block or JSON-compatible flow output, inspect top-level types, and keep long IDs and decimal fractions intact.

Free online tool

Loading tool…

146 / 500,000 characters. Processing stays in this browser.

Normalize YAML data

This is a data normalizer: it removes comments, directives, scalar styles, and anchor names. Aliases expand into data. Keys and strings are double quoted so their types stay clear.

Uses the YAML 1.2 core schema. Integers and decimal tokens preserve precision. Infinity, NaN, custom tags, cyclic aliases, multiple documents, and complex keys are rejected. Merge keys are literal strings. Bounds: 64 levels, 50 alias expansions, 50,000 expanded nodes.

All parsing and exports run locally in your browser. Example records are original fictional data, not an external dataset.

GET STARTED

How to use the YAML Formatter

  1. 01

    Paste a single YAML 1.2 document or open its UTF-8 file.

  2. 02

    Pick indentation, optional key sorting, and block or flow output.

  3. 03

    Normalize, inspect the top-level outline, and export the YAML.

Examples

Keep an ID exact

record_id: 9007199254740993 remains an exact integer instead of becoming 9007199254740992.

Make scalar types visible

enabled: true stays Boolean, while label: yes becomes a quoted string in normalized output.

A data normalizer with explicit tradeoffs

Output preserves the supported data tree rather than the original document presentation. Comments, directives, quoting style, anchor names, and blank-line layout are removed. Aliases expand into ordinary values. Use a source-aware editor when comments are part of your configuration documentation.

Predictable scalar handling

The YAML 1.2 core schema decides scalar types. Strings and mapping keys are emitted with JSON double-quote syntax. Integer tokens are handled as arbitrary-precision integers; decimal tokens are retained as decimal text. Non-finite values are rejected because this workflow intentionally stays JSON-compatible.

Bounds for shared configuration

Input is limited to 500,000 characters, 64 nesting levels, 50 alias expansions, and 50,000 expanded nodes. Recursive aliases, custom tags, complex mapping keys, and multiple documents return errors. Merge keys are treated as literal keys rather than merging settings.

What to know

  • Input is limited to 500,000 characters. Review the supported syntax and export policy described above.

Common questions

Will comments survive?

No. The tool clearly normalizes data and removes comments. Keep a copy of commented configuration before replacing it.

Are YAML dates converted to timestamps?

No. Timestamp tags are not enabled, so ordinary date-like core-schema scalars remain strings.

Does sorting move array items?

No. Sorting changes mapping-key order recursively; sequence order remains unchanged.

Sources & references