Unformat.online

Prettify YAML Online

Format YAML with consistent, clean indentation. Paste messy or inconsistently indented YAML and get normalized output — 100% client-side.

Rules:Smart QuotesConverts curly quotes (“” ‘’) to straight quotes. Always active.Non-Breaking SpacesReplaces non-breaking spaces (U+00A0) with regular spaces. Always active.Line EndingsNormalizes CRLF → LF and trims trailing whitespace per line. Always active.Removes invisible zero-width characters (U+200B, U+200C, U+200D) that silently break string comparisons.Strips the Byte Order Mark (U+FEFF) that causes “invalid character” errors in parsers and editors.Removes soft hyphens (U+00AD) from PDFs that show as garbled characters in code editors.Converts mixed tabs/spaces to a consistent indent width. Click to pick a size.Collapses all line breaks into one continuous paragraph. Great for reflowing PDF or email text.Control blank line density. Click to pick Keep 1 or Remove all.Text never leaves your browser
0 characters

YAML prettification explained

YAML prettification parses the document and re-serializes it with normalized indentation. This corrects mixed tabs and spaces, normalizes inconsistent indent depths, and ensures every key-value pair is formatted consistently.

The round-trip parse-and-serialize approach also validates your YAML — if it contains syntax errors, you will see an error message instead of formatted output. This means prettified output is always valid YAML.

Common sources of messy YAML: copy-pasting from terminals (which may convert spaces to tabs), editor auto-indent mismatches, and YAML generated by tools that use different indent sizes. Prettifying standardizes all of these.