YAML Frontmatter Extractor
Paste a Markdown file and split the YAML frontmatter from the body. The mapping is printed as JSON. A YAML timestamp becomes an ISO string.
The file never leaves the browser. Nothing is uploaded, and the file is not stored in the URL.
The opening --- has to be the first line. The first later line that is exactly --- closes it. Files up to 1 MB open in the page. The page stops at 1,000,000 characters.
Not extracted
Mapping and body
Copy and Download use this summary.
About this tool
Jekyll, Hugo, and Astro content collections put a YAML mapping at the top of a Markdown file. The file starts with a line that is exactly---, then the mapping, then another line that is exactly---. Everything after the closing line is the body. A blank line before the opening fence means there is no frontmatter.
The YAML is parsed as YAML 1.1, which is the schema those generators use. An unquoted timestamp becomes a date, and this page writes that date with toISOString(). A date-only value such as2026-11-05 becomes midnight UTC. A quoted date stays a string, because the quotes tell YAML not to treat it as a timestamp.
The document has to be a mapping. A list is refused. An empty document becomes {}. The first line whose text is exactly--- closes the frontmatter, even if that line sits inside a YAML multiline string. Trailing spaces on the closing line do not count as the fence. A leading BOM is removed and noted.
Read more
Free books, courses, and software
Get my programming books, course editions, and complete software.
Get the download library →