Obsidian YAML Front Matter: Syntax & Common Errors
How Obsidian properties are stored as YAML — and the six mistakes that trigger "Invalid YAML in Frontmatter".
What front matter is in Obsidian
When you add properties to an Obsidian note, they are saved as a
YAML front matter block at the top of the file:
the YAML sits between two --- lines, and your note text begins after the
closing ---.
---
title: My First Note
tags:
- yaml
- notes
date: 2026-08-21
---
# Heading
The rest of your note goes here. It is not YAML.
Obsidian only parses the part between the --- lines. The body of the note
is ignored, which is why a frontmatter validator can check just that block.
The 6 most common errors
1. Tabs instead of spaces
YAML only allows spaces for indentation. A single tab anywhere in the block breaks parsing. If your editor inserts tabs, switch it to 2 spaces for YAML.
2. A BOM at the start of the file
Some editors add a byte-order mark (BOM) as the very first character. Obsidian and many YAML parsers choke on it and report a cryptic error. Remove the BOM and the note often works immediately.
3. Unquoted values with a colon
A value like title: Meeting: Q3 confuses the parser because of the second
colon. Quote the whole value: title: "Meeting: Q3".
4. Dates that get reinterpreted
Unquoted values such as 2026-08-21 or 1.0 are silently turned into
dates or numbers by YAML. If you want them stored as text, wrap them in quotes:
date: "2026-08-21".
5. Tags written as a comma string
tags: yaml, notes is read by Obsidian as one tag called
yaml, notes. Use a list instead:
tags:
- yaml
- notes
The inline form tags: [yaml, notes] is also valid.
6. Missing or extra closing ---
If the closing --- is missing, everything below the opening delimiter is
treated as YAML and almost always fails. Make sure the block opens and closes with
--- on its own line.
Validate before you commit
Instead of guessing, paste the whole note into the
YAML frontmatter validator. It extracts the
--- block, ignores the note body, and reports the exact line of any error —
plus warns you about tabs, BOM, and comma-style tags. Everything runs in your browser, so
your notes never leave the page.
For deeper YAML basics, see the indentation guide and the validation guide.
FAQ
What is YAML front matter in Obsidian?
It is the block of YAML between the two --- lines at the very top of a note. Obsidian reads it to assign properties such as title, tags, aliases and dates. The body of the note lives after the closing ---.
Why do I get Invalid YAML in Frontmatter in Obsidian?
The most common causes are tabs used for indentation, a missing closing ---, an unquoted colon in a value, a BOM at the start of the file, or writing tags as a comma string instead of a list. Paste the note into a frontmatter validator to see the exact line.
How should tags be written in Obsidian front matter?
Use a YAML list: tags: followed by indented lines starting with a dash. Writing tags as tags: a, b is read by Obsidian as a single tag, not two.
Keep reading
- YAML front matter guide — the concept across Hugo, Jekyll and Astro.
- Hugo vs Jekyll front matter — how the two generators differ.
- YAML frontmatter validator — check your note in the browser.