How to fix and format YAML online

YAML breaks on invisible things — a tab where spaces are required, a smart quote, a stray BOM. Yellorn's Data Doctor repairs the common YAML mistakes and reformats, then tells you exactly what it changed.

YAML is whitespace-significant, so the errors that break it are usually invisible in a normal editor: a tab used for indentation (YAML requires spaces), a curly smart quote pasted from a document, a hidden byte-order mark, or a key that is simply missing its colon. The parser fails with a cryptic message and points at a line that looks perfectly fine.

Yellorn's Data Doctor repairs the common YAML mistakes automatically, in your browser, and shows you exactly what it changed — so you fix the file instead of hunting for an invisible character.

  1. Paste your YAML into the editor. Yellorn auto-detects the YAML format — or pick YAML from the format selector.
  2. Press Cmd + Shift + F (Smart Format). Yellorn repairs the buffer, reformats it, and reports each fix.

For example, a parent key that is missing its colon — a high-frequency YAML typo — is repaired from this:

services
  - web
  - worker

into valid YAML:

services:
  - web
  - worker

Smart Format runs these conservative passes:

  • Tabs → spaces — converts leading tabs to two-space groups (YAML forbids tab indentation; this is the single most common YAML error).
  • Smart quotes → ASCII — replaces curly “ ” ‘ ’ with straight quotes.
  • BOM strip — removes a leading byte-order mark that shifts the first line.
  • Markdown fence strip — pulls the YAML out of a ```yaml code block pasted from chat or docs.
  • Missing colon — adds the : to a bare key that is followed by an indented block.
  • Unbalanced brackets — auto-closes an unterminated [ or { flow collection.

Each fix is listed in the status bar as Auto-fixed: … so you consent to every change — Yellorn never silently reshapes your data.

Once the YAML parses, convert it to JSON, XML, TOML, or CSV from the Convert to… menu — JSON ↔ YAML is lossless both ways — or explore it as a collapsible tree or a node graph. Parsing, repair, and conversion all run locally, so a YAML config full of secrets or internal hostnames never leaves your browser.

Why is my YAML invalid?

The most common cause is a tab character used for indentation — YAML forbids tabs and requires spaces, so a single pasted tab breaks the document with an error like 'found character that cannot start any token'. Smart quotes from a word processor, a hidden byte-order mark, and a key missing its colon are the other frequent culprits.

How do I fix YAML indentation online?

Paste the YAML into Yellorn and press Cmd/Ctrl + Shift + F (Smart Format). It converts leading tabs to two-space groups, which resolves the most common YAML indentation error, then reformats the document. Each repair is listed in the status bar so you can see what changed. It runs entirely in your browser.

What YAML problems does Yellorn fix automatically?

Smart Format strips a byte-order mark and markdown ```yaml fences, converts tab indentation to spaces, straightens curly smart quotes to ASCII quotes, adds a missing colon before an indented block, and auto-closes unbalanced [ or { flow collections — then reports each fix so nothing is changed silently.

Can I convert the fixed YAML to JSON?

Yes. Once the YAML parses, use the Convert to… menu to turn it into JSON, XML, TOML, or CSV in one click. JSON ↔ YAML is lossless in both directions because both represent the same structure, and a single undo restores the original YAML and format together.

Is my YAML uploaded to a server?

No. Parsing, repair, formatting, and conversion all happen in your browser, so it is safe to fix a YAML config that contains secrets, connection strings, or internal hostnames. Nothing you paste is sent to a server.

Try a fix in the editor or browse more articles.