2026-10-03

A YAML Formatter and Validator Alternative That Runs in Your Browser (YAML Lint and More)

YAML is easy to read and easy to break. One tab, one wrong indent or one unquoted colon, and a pipeline or manifest fails with an error that points nowhere useful. Online YAML validators fix that, but they usually mean pasting configuration, which often includes hostnames, internal service names and sometimes secrets, into someone else's server.

iLoveDevTools's YAML Formatter / Validator parses the YAML in your browser using js-yaml, so nothing is uploaded.

What it does

Validates with a location. If the document is invalid, the message gives the line and column and the parser's reason, for example a bad indentation of a mapping entry. Fix it, run again, and you are done.

Formats. Valid YAML is re-printed with 2, 4 or 8 space indentation and no forced line wrapping, with an option to sort mapping keys alphabetically so two files are easier to compare.

Minifies. The minify option writes compact flow style, such as {name: app, ports: [80, 443]}. It parses to the same data but is rarely how YAML is hand-written.

Handles multiple documents. Files with several documents separated by --- are checked and formatted together, and the status line reports how many documents were found.

The limitation you should know about

Formatting reads your YAML into data and writes it back out, so comments are not preserved, and anchors and aliases are expanded rather than kept. If you want to check a file without altering it, use Validate, which never changes your text. If your comments matter, format by hand or use an editor integration that edits the YAML text itself.

How it compares

yamllint. The command-line linter checks style rules such as line length, trailing spaces and duplicate keys, and fits naturally into CI. It is the right tool for enforcing a house style across a repository. This tool does not enforce style rules; it answers "does this parse, and where does it break?" quickly, without installing anything.

Online YAML linters. Sites such as YAML Lint do the same quick check through a web form. Their strength is familiarity. The difference here is that parsing is local, which matters when the YAML is a real config.

Your editor. VS Code and JetBrains IDEs highlight YAML errors live and can format on save, often keeping comments. If the file is already open in your editor, that is usually the fastest route.

Converting instead of formatting

If you want YAML as JSON, or JSON or CSV as YAML, use the Data Format Converter. For JSON that needs the same check, use the JSON Formatter and Validator.

Verdict

For a private, fast "is this valid, and where is it wrong?" check with tidy output, try the YAML Formatter. For style enforcement in CI, use yamllint, and for edits that must keep comments, edit in your editor.

Try YAML Formatter / Validator · More guides · All tools