Markdown Frontmatter
Extract YAML (---), TOML (+++), or JSON frontmatter from a markdown file, returning the metadata as JSON and the body separately. Auto-detects the fence style.
About Markdown Frontmatter
Markdown Frontmatter extracts the metadata block from the top of a markdown file, whether it is YAML (---), TOML (+++), or JSON, and returns the parsed metadata as JSON with the body content separated out. It auto-detects the fence style, so you do not have to tell it which format you used. This is the tool for inspecting or debugging the front matter that static site generators like Jekyll, Hugo, Gatsby, and Astro rely on. It runs in your browser.
- Category
- text
- Input
- Accepts: text/markdown or text/plain.
- Output
- Outputs: application/json (multiple).
- Cost
- Free, runs in your browser
- Memory
- low
Common uses
- Pull the title, date, and tags out of a Hugo or Jekyll post for an index or audit
- Check that a draft's front matter parses cleanly before a build fails on it
- Separate the metadata from the body so you can process the prose with a text tool
- Inspect an Astro or Gatsby content file whose front matter format you are unsure of
- Verify which keys are present across a batch of blog posts
- Debug a broken build by confirming the fence style and structure of a file's front matter
Frequently asked questions
Which front matter formats are supported?
YAML fenced with ---, TOML fenced with +++, and JSON. The fence style is auto-detected, so you do not need to specify it.
What does the output contain?
A JSON result with the parsed metadata and the markdown body returned separately, so you can use either piece independently.
What if my file has no front matter?
The tool returns the body as-is with empty or absent metadata, since there is no metadata block to extract.
Does my markdown get uploaded?
No. The file is parsed locally in your browser and never sent to a server.
Does it work with the generators I use?
Yes. The YAML, TOML, and JSON fence conventions it handles cover Jekyll, Hugo, Gatsby, Astro, and most other static site generators.
Keywords
- markdown
- frontmatter
- yaml
- toml
- json
- metadata
- jekyll
- hugo
- gatsby
- astro