YAML formatter

Format YAML, keep comments, and see a JSON conversion.

Privacy: runs in your browser

This tool processes your input in this browser. Inputs and results are excluded from analytics. Recent tools save tool names, visit counts and last-visit times. Favorites store only tool names. Draft saving is optional and stays on this device; delete saved text with the draft controls. Loading text from a URL is optional and contacts that server; its URL and your IP address are visible to the server. When a button sends your result to another tool, it waits in this tab until that tool opens it, for up to a minute, and is then deleted.

Copy link includes the inputs you choose to share in the address. Anyone with that link can reopen them. Files and generated results are excluded. Password and key tools share settings only.

Your result

 

Save a draft on this device

Draft saving is off. Nothing is uploaded.

More
Keyboard shortcuts

Sharing and starting over

A copied link includes what you entered and your settings, so anyone with it can see them. Leave private text out. Files and results are not included; random draws are made again.

Start over puts the tool back to its starting values and closes any open file or device. Drafts you saved stay on this device until you delete them.

Indentation is part of YAML

The YAML parser reports the line and column of invalid input. Formatting keeps comments. Convert to JSON reads the values, so comments and YAML-specific presentation are not part of that output.

Next: JSON formatter

Worked example

octopus: arms: 8 is a mapping inside another mapping. Replacing indentation with tabs can make it invalid.

Before you rely on the result

One document at a time is supported. Custom tags are not interpreted, and unsafe integers are rejected for JSON conversion rather than rounded. Cyclic aliases cannot become ordinary JSON.

Help with the result

Cite this page

ToolOctopus. “YAML formatter.” Updated . https://tooloctopus.com/yaml-formatter.

Add an access date if your instructions require one.

Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. License and source code.

Find a tool

Type a task, a unit pair, a sum or a time zone. ↓ to choose, Enter to open.