OneFreePlace · Developer Tools · #341

YAML Formatter

Format YAML without casually destroying the things that matter. Preserve comments, anchors, aliases, block scalars, key order and exact scalar text — with an optional semantic verification audit before you download.

100% freeLocal processingNo upload
Input YAML0 lines · 0 B
Formatted YAMLWaiting for YAML
Canonical data view changes presentation. It parses and re-emits data, so comments, anchors, aliases and original scalar styles may be normalized. Use Presentation-safe mode when those details must remain intact.
Semantic check—
Comments—
Anchors / aliases—
Block scalars—
Changed lines—
●
Ready. Formatting happens entirely in your browser.
Drop YAML files here
or click to choose multiple .yaml/.yml files. Everything stays local.

Why this formatter is safer

Presentation-safe mode avoids parse-and-rebuild formatting. It keeps comments, anchors, aliases, key order, quoted values and block-scalar payloads in place while normalizing structural whitespace.

Semantic verification

For YAML supported by the built-in YAML 1.2 parser, the tool parses both input and output and compares canonical data. A green “Verified” means the formatted result represents the same data under that parser.

Advanced YAML

Directives, custom tags and unusual presentation constructs are preserved in Presentation-safe mode. If the built-in semantic parser cannot confirm them, the formatter says “Unverified” rather than pretending they were validated.

Block scalars

Literal | and folded > scalar payloads are treated as protected content. Their text is not trimmed, wrapped or quote-normalized.

Canonical mode

Use canonical mode when you want a clean data-oriented YAML representation and do not need comments or alias presentation preserved. It is intentionally explicit because re-emitting YAML can change presentation details.

Privacy

No account, no server upload and no telemetry are required by this tool. File reading, formatting, verification and ZIP creation run in the browser.

Example

service: name: api # public service ports: - 8080 - 8443 banner: | Keep this text exactly. # This hash is content, not a comment.