Skip to content
Input
YAML
Limit
1 MiB
Runtime
Browser

Format YAML with explicit indentation

Parse a bounded YAML document and serialize it with a chosen indentation so mappings and sequences are easier to review.

Local processingNo sign-upNo content logging

Format YAML

Inputs are limited to 1 MiB and stay in this browser tab.

Paste or edit the source. Tool Swim does not upload or save it.

Formatted YAML

Nothing is placed in a URL, account, preset, or remote log.

What this tool does

Strict, bounded, local processing

Formatting is a parse-and-serialize operation, not an indentation repair guess. Invalid or ambiguous source remains available for deliberate correction.

A real parse protects scalar meaning

Replacing spaces line by line cannot reliably distinguish indentation from whitespace inside block scalars or quoted text. The formatter parses the YAML data model first and writes one consistent representation only after the document is valid.

The selected indentation changes visual nesting. It does not sort mapping keys, reorder sequences, merge documents, or apply an application schema.

Review representation-sensitive changes

A serializer may choose a normalized scalar style while preserving the represented value. Compare the result before replacing a hand-authored file when comments, anchors, or presentation choices are part of a review workflow.

Primary references

Questions and answers

Related YAML tools