# Markdown frontmatter to meta tags

> Paste a markdown file with YAML frontmatter and get its title, description, canonical, Open Graph and X card tags as HTML, ready to copy. Free.

Canonical: https://atrby.site/tools/md-meta
Last updated: 2026-10-26

Open the interactive tool: [Markdown to meta tags](https://atrby.site/tools/md-meta). It runs in the browser, with no sign-up.

## What it does

If you write posts in markdown, the details for each page usually live in frontmatter at the top of the file: a title, a description, a slug, an image, a date. Turning those into the right meta tags by hand is dull, and easy to get slightly wrong.

Paste a markdown file here and you get the matching tags as HTML: the title tag, meta description, canonical link, Open Graph tags and an X card. Relative paths become full URLs using your site address. It updates as you type, runs in your browser, and tells you which useful fields your frontmatter is missing.

## How to use it

1. Paste your file, frontmatter included, into Markdown with frontmatter. The frontmatter must be at the very top, between two lines of three dashes.
2. Enter your site address in Site URL (makes paths absolute), such as https://example.com.
3. Read the generated tags in the Meta tags box. Any missing fields are listed under it.
4. Press Copy and paste the tags into your page's head, or use them to check what your site generator should output.

## The fields it reads

Different site generators use different names for the same thing, so the tool accepts the common ones.

- title: becomes the title tag and og:title.
- description, summary or excerpt: becomes the meta description and og:description.
- image or cover: becomes og:image and switches the X card to summary_large_image.
- canonical, url or slug: becomes the canonical link and og:url.
- date or published: sets og:type to article and adds article:published_time.

## Things to know

It reads simple key: value lines. Lists and nested values are skipped, and quotes around values are removed. Write dates as YYYY-MM-DD so article:published_time gets a standard format.

The title is used exactly as written. If your site adds a brand name to every title, add it in your template, not here. Open Graph tags need full URLs, so fill in the site URL whenever your image or slug is a path.

Once the tags are live, check how the page looks when shared with the Open Graph preview.

## Questions

### What is frontmatter?

A block of key: value lines at the very top of a markdown file, between two lines of three dashes. Site generators like Astro, Hugo, Jekyll and Next.js blogs read it for each page's details.

### Why does it say no frontmatter found?

The block has to start on the first line of the file with three dashes and end with another line of three dashes. Anything above it, even a blank line, stops it being read.

### Does it support TOML frontmatter?

No. It reads YAML-style key: value frontmatter between dashes. TOML frontmatter between plus signs isn't read.

### Does it add og:site_name or twitter:title?

No. X falls back to the Open Graph title and description, so they aren't needed. Add og:site_name in your template if you want it.

### Is my file sent anywhere?

No. Everything runs in your browser.

## Related
- [All free tools](https://atrby.site/tools)
- [Analytics snippet generator](https://atrby.site/tools/snippet-generator)
- [Cookie banner explainer](https://atrby.site/tools/consent-explainer)
