All tools

Markdown Front Matter Parser

Code

Split a Markdown document into its YAML front matter fields and body content

Paste a Markdown document with a YAML front matter block at the top (the section between two --- delimiter lines used by static site generators like Jekyll, Hugo, and Next.js MDX pipelines) and get back the parsed fields and the body content separately. It handles plain string, quoted string, boolean, number, and null scalar values, plus inline arrays like tags: [a, b] and YAML block lists written on their own indented lines. It is intentionally not a full YAML parser: nested mappings and multi-line block scalars are not supported, so front matter that goes beyond flat key-value pairs and simple lists will need a real YAML parser instead. A document with no opening delimiter is passed through unchanged with hasFrontMatter set to false rather than treated as an error.

markdownyamlfrontmatterparser

How to use Markdown Front Matter Parser

  • 1.Paste a Markdown document that starts with a --- delimited front matter block.
  • 2.Read the parsed fields in the table, with each value's inferred type (string, number, boolean, null, or array).
  • 3.Copy the front matter as JSON or copy the body content separately for use downstream.

Frequently asked questions

Does this support full YAML syntax in the front matter?
No, only flat key-value pairs, quoted and unquoted scalars, inline arrays, and simple block lists are parsed. Nested mappings and multi-line block scalars (the | and > YAML syntax) are not supported.
What happens if my document has no front matter at all?
It's returned as-is with hasFrontMatter set to false and the full input treated as the body, not as an error.
What if the opening --- delimiter has no matching closing delimiter?
That's treated as an error, since it usually means the front matter block was left unclosed by mistake.
Is my document sent to a server?
In the browser, parsing runs entirely locally. The REST/SDK/MCP surfaces process the input server-side for that single request only and store nothing.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/markdown-front-matter-parser \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"input":"---\ntitle: Hello World\ntags: [foo, bar]\n---\n# Body"}'

Get an API key from your dashboard · Full API docs →