Free tool

YAML and JSON Frontmatter Generator for Markdown

Form-based frontmatter builder for Obsidian, Jekyll, Hugo, Astro, and Notion exports. Switch between YAML and JSON, add custom fields, copy with one click.

A form-based builder for the metadata block that goes at the top of a Markdown file. Fill in the standard fields (title, description, date, author, slug, tags, categories, draft flag) and add any custom fields your static site generator needs. Toggle between YAML (the default for Jekyll, Hugo, Astro, Obsidian) and JSON output, then copy the result with one click. If you already have a file with existing frontmatter, paste it into the import box and the form pre-fills so you can edit instead of retyping. The chip-style inputs for tags and categories handle quoting and array formatting for you, so you do not have to remember whether flow-style arrays or block-style lists are expected. Works offline after load. Nothing you type is sent anywhere.

Fields

Custom fields

Add anything your SSG needs (e.g. layout, image, series, weight).

---
date: 2026-10-06
draft: false
---

Paste at the top of your Markdown file. For YAML, the --- delimiters are already included.

Using the Frontmatter Generator in practice

Frontmatter is one of those things that sounds simple and gets fiddly fast. Is the date supposed to be quoted? Should tags be a flow-style array or a block-style list? Does Hugo want publishDate or pubDate? What does Astro expect in draft, a boolean or the string "true"? This generator encodes the common defaults so you do not have to re-check the docs every time you start a new post.

Concrete example one: a Jekyll blog. Fill in title, description, date, author, tags, and categories. Toggle YAML. Copy. Paste at the top of your new .md file between two --- delimiters. Commit. The post now has everything the Jekyll collection needs to render. If your theme uses additional fields like layout, image, or excerpt, add them as custom fields.

Concrete example two: Obsidian vault hygiene. If you are adding structured metadata to a bunch of notes for Dataview queries, the generator makes it trivial to produce consistent frontmatter across every note. Tags, aliases, status, priority, project: all as custom fields. The YAML output is ready to paste at the top of each note. For a walkthrough of syncing Notion and Obsidian with consistent frontmatter, see How to sync Markdown with Notion and Obsidian.

Concrete example three: cleaning up an import. Say you exported a Notion database as Markdown and the frontmatter came out oddly formatted or missing required fields for your static site generator. Paste a file into the import box, edit in the form, copy the corrected block, paste over the original. Repeat for each file. It is faster than hand-editing, and the form enforces consistent shape across the batch. If your source documents are not in Markdown yet, the Word to Markdown converter will give you a clean starting point you can then annotate with frontmatter here.

How to use this tool

  1. 1

    Fill in the standard fields (title, description, date, author, slug) on the left.

  2. 2

    Use the chip inputs to add tags and categories. Press Enter or comma to add, and click the × to remove.

  3. 3

    Add any extra fields your static site generator needs using the custom fields section.

  4. 4

    Toggle YAML vs JSON at the top of the output panel. Click "Copy" to grab it, then paste at the top of your Markdown file.

  5. 5

    Already have a file with frontmatter? Click "Import existing" and paste the file contents to pre-fill the form.

Frequently asked questions

What is frontmatter?+

Frontmatter is a block of metadata at the very top of a Markdown file, wrapped in "---" for YAML or "+++" for TOML, or as a JSON object for tools that support it. Static site generators (Jekyll, Hugo, Astro, Next.js MDX), knowledge tools (Obsidian, Logseq), and publishing platforms read it to figure out the post title, date, tags, layout, and anything else you want to attach to the document.

YAML or JSON: which should I use?+

YAML for almost every static site generator and for Obsidian: it is the de facto default and easier to read and edit by hand. JSON only when your pipeline specifically requires it (some custom MDX setups, or when you are shipping the file through an API that parses JSON more reliably than YAML). When in doubt, use YAML.

Does this work with Obsidian?+

Yes. Obsidian reads YAML frontmatter and uses the tags, aliases, and cssclass fields for native features. The generator supports tags, aliases (add a custom field named "aliases"), and any other field you want to use in Dataview queries or with plugins.

Can I import existing frontmatter and edit it?+

Yes. Click "Import existing" and paste in a Markdown file that already has a frontmatter block. The form fields populate with whatever was there, and anything unrecognised lands in the custom-fields section so you can keep editing it.

How are tags and categories formatted?+

Both are emitted as YAML arrays ([tag1, tag2]) or JSON arrays. For tags with spaces or special characters, we quote them. This matches what Jekyll, Hugo, Astro, and Obsidian all expect.

Is my data sent anywhere?+

No. Everything is generated in your browser. We do not see titles, tags, or any other field.

Related tools

Related learning

Need to convert real files to Markdown?

This tool is a free helper. For full PDF, Word, Excel, PowerPoint, EPUB, and image conversion with AI-ready output, create a free account.