Quoted-Printable Encoder
Encode and decode quoted-printable, the MIME encoding in every email header.
Normalise YAML indentation, quoting and key order in one pass.
Comments are not preserved — they are not part of the parsed document, so re-emitting cannot keep them.
The YAML Formatter parses a file and writes it back with one indentation width and one quoting rule, quoting any string that would otherwise change type when read — the source of most YAML surprises.
YAML is whitespace-significant, which makes a hand-edited file drift: two spaces here, four there, some values quoted and some not. The formatter parses the document and writes it back with one indentation width, one quoting rule and, optionally, sorted keys.
The quoting is the part that prevents bugs. YAML reads unquoted no, off, yes and on as booleans, and a value such as 007 as the number 7 — so the formatter quotes any string that would otherwise change type on the next read. Tabs, which YAML forbids for indentation entirely, are converted to spaces. Comments are not preserved, because they have no place in the parsed document.
Strings such as yes, off, null and 007 are quoted, because unquoted they would come back as a boolean, a null or a number.
YAML forbids tabs for indentation entirely. Any that crept in are converted to spaces rather than left to break the file.
A hand-edited file that drifted between two and four spaces comes back consistent throughout.
Sort keys at every level to make two versions of a manifest comparable by eye or by diff.
Documents separated by --- are all read, so a Kubernetes manifest bundle is handled as one input.
A Docker Compose file, a CI config, a Kubernetes manifest or any config file.
Two spaces is the near-universal convention; four is also offered.
Automatic quotes only what needs it; always-quote is safest for values passed to a shell.
The tidied document is ready to commit.
The specification forbids them for indentation, because a tab has no fixed width and the structure depends on exact columns. The formatter converts them to spaces.
Because it would otherwise change type. Unquoted no, off, yes and on read as booleans, 007 reads as a number, and a value with a colon in it would read as a nested key.
No. Comments are not part of the parsed document, so a formatter that re-emits from the parse tree cannot preserve them. Keep a copy of the original if the comments matter.
Documents separated by --- are read, and the result is emitted as a list when there is more than one.
What people who use the YAML Formatter think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the YAML Formatter. It takes half a minute and no account.
Write the first reviewEncode and decode quoted-printable, the MIME encoding in every email header.
Find what runs on a port, with a note on whether it should be exposed.
Encrypt text with a password using AES-GCM, and decrypt it back.
Stack CSS filters on a real image and copy the declaration.
Every HTTP status code, searchable, with what it actually means.
Build a frosted glass panel with backdrop blur, over a real background.
Your screen size, viewport, pixel ratio and which breakpoint is active.
Turn text into a block-letter ASCII banner for a README or a CLI.