I Got Tired of Broken YAML Front Matter in Obsidian — So I Built a No-Upload Fixer
If you use Obsidian, Hugo, or Jekyll, you've probably seen this error: YAML front matter parsing error: ... It usually shows up right when you need the note most. And the worst part? The error message tells you somet
If you use Obsidian, Hugo, or Jekyll, you've probably seen this error:
YAML front matter parsing error: ...
It usually shows up right when you need the note most. And the worst part? The error message tells you something is wrong, but rarely where.
The three mistakes I kept making
After way too many broken notes, I noticed the same culprits:
- Tabs instead of spaces. YAML forbids tabs for indentation. One pasted tab and the whole block fails.
-
A missing closing
---. You open front matter and forget to close it. -
Unquoted
yes/no/ numbers like007. YAML silently turnsyesintotrueand007into7. For Obsidian tags or version fields, that's a silent data change.
(There's a longer catalog of these at yamltoolbox.com/yaml-errors if you want the full list.)
Why I didn't want to paste my notes into "just any" validator
Most online YAML validators ask you to paste your content into their server. For a config file that's fine. For private Obsidian notes — reading lists, daily journals, work-in-progress — I didn't love the idea.
So I built one that runs 100% in the browser. Nothing is uploaded. You paste the note, it checks only the --- block (so the Markdown body never causes false errors), and shows the exact broken line.
👉 YAML Frontmatter Validator & Fixer
What "fix" actually does
It doesn't rewrite your note into something clever. It does the conservative stuff:
- adds the missing closing
--- - trims trailing whitespace that breaks parsing
- quotes
yes/no/007so they stay strings - reports every change it made, line by line
Before:
---
title: My Note
tags: a, b
draft: yes
---
After:
---
title: My Note
tags:
- a
- b
draft: "yes"
---
The draft field stays "yes" instead of becoming a boolean. Small thing, but it's the difference between a note that renders and one that doesn't.
Validate the rest of your YAML too
The same no-upload rule applies to the plain YAML Validator — handy right before you commit a GitHub Actions or Docker Compose file.
Why I'm writing this
Third-party write-ups get cited far more than your own site does. I'm not claiming this is the only fixer out there — but if you've lost an afternoon to a missing ---, it might save you the next one.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.