String Utilities Tool updated 1 day ago

Markdown Metadata Generator

Markdown Metadata Generator turns a JSON object into YAML front matter wrapped in --- lines, ready to paste at the top of a Markdown file for Jekyll, Hugo, Eleventy and similar tools. Your JSON is checked in the browser, then converted on the server by the Symfony YAML component. Copy the block or download it as markdown-front-matter.md.

Always Free Easy to use Instant results Private and secure

Use Markdown Metadata Generator

Markdown Metadata Generator

Convert a JSON object into clean YAML front matter for Markdown documents.

Input JSON Object

Paste a valid JSON object to convert
Input must be a JSON object. It will be sent as data to the API.
Waiting for JSON
Input status
0 lines
Generated output

Output Front Matter

Generated YAML front matter
Metadata tip
Use this tool to create front matter for blog posts, documentation pages, static-site files, changelogs, and Markdown-based CMS content.

Read Content

Learn how the tool works and when to use it.

Turn a JSON object into YAML front matter

Markdown Metadata Generator builds the metadata block that sits at the very top of a Markdown file. You give it a JSON object, for example the fields your blog post or documentation page needs, and it returns the same data written as YAML between two --- lines. That block is called front matter, and it is how static site generators and Markdown-based content systems learn a page's title, date, tags, author, layout and any other field you define.

Writing front matter by hand is easy to get slightly wrong. YAML cares about indentation, colons inside values can break parsing, and a date or a word like yes may be read as a different type than you meant. Starting from JSON, which most developers already produce from scripts, APIs or a CMS export, and letting a real YAML library do the formatting removes most of those small mistakes.

Where front matter is used

Front matter is read by tools such as Jekyll, Hugo, Eleventy, Astro, Docusaurus, Gatsby and many headless or flat-file CMS platforms. Typical uses include:

  • Blog posts: title, date, author, tags, draft.
  • Documentation pages: sidebar_position, slug, description.
  • Changelogs and release notes: version, released, breaking.
  • Note-taking vaults: aliases, created, status.

The tool does not know which generator you use and does not add any fields of its own. It writes exactly the keys you supply, in the order you supply them.

What happens when you click Generate

This is the one tool in the Markdown family that relies on the server for its main job. Your browser first checks the input locally: it must be valid JSON and it must be an object (curly braces), not an array, a string or a number. The Input status card shows "Waiting for JSON", "Invalid JSON", "JSON must be an object" or "Valid JSON object", and the footer counts the top-level keys.

When the input is valid, the object is sent to the site's API as the data field. On the server, the Symfony YAML component converts it, and the result is wrapped in --- lines and returned to the page. The endpoint returns the YAML and does not save your data; it is rate-limited like the site's other tool endpoints. If you are working with confidential values, remember that they do leave your device for this step.

How values are written

The formatting follows fixed settings in the code, which explains most of what you will see in the output:

JSON inputYAML outputWhy
"title": "Hello: World"title: 'Hello: World'A colon followed by a space would break YAML, so the value is quoted.
"date": "2024-05-01"date: '2024-05-01'A string that looks like a date is quoted so it stays a string.
"draft": falsedraft: falseBooleans and numbers keep their type.
"tags": ["a", "b"]a block list with - a and - bLists are written one item per line.
"summary": "line1\nline2"summary: |- followed by indented linesMulti-line strings use a literal block.
"empty": []empty: {}An empty list becomes an empty mapping (see limitations).

Indentation is two spaces per level. Nesting is written in block style for the first four levels; anything deeper is written inline in flow style, such as b: { c: 1 }. Some keys that YAML 1.1 parsers treat as special words, such as n or y, are quoted.

Step-by-step

  1. Prepare a JSON object. Example: {"title": "Launch notes", "date": "2026-03-02", "tags": ["release", "product"], "draft": false}.
  2. Paste it into the Input JSON Object editor, or click Paste JSON to read it from your clipboard.
  3. Look at the Input status card. Fix any syntax error until it says "Valid JSON object".
  4. Click Generate. The button shows "Working" while the request is in flight.
  5. The YAML appears in Output Front Matter, and the Generated output card shows the line count.
  6. Click Copy Front Matter and paste it at the very top of your Markdown file, or click Download to save it as markdown-front-matter.md.
  7. Copy Input copies your JSON back out; Clear empties both editors.

Example output

For the JSON above, the generated block is:

---
title: 'Launch notes'
date: '2026-03-02'
tags:
- release
- product
draft: false
---

The YAML library is cautious with strings: a title containing a space is single-quoted, and the date is quoted because it looks like a date. Single words such as release are left bare. Both forms are valid YAML and read the same way.

Good habits

  • Use the field names your generator expects. Hugo, Jekyll and Docusaurus each document their own keys. The tool will not rename date to pubDate for you.
  • Decide how you want dates typed. Because date-like strings are quoted, your site will receive a string. Most generators parse it fine, but if you need a native timestamp, remove the quotes after pasting.
  • Put the block first. Front matter only works when --- is the first line of the file, with nothing before it, not even a blank line.
  • Generate from scripts. If you export posts from a database or spreadsheet, produce one JSON object per post and run each through the tool to check how it will look.

Things to avoid

  • Do not paste a JSON array of several posts. The input must be a single object; arrays are rejected before anything is sent.
  • Do not paste existing YAML or Markdown. The input is parsed as JSON only.
  • Do not send an empty object {}. The API requires at least some data and responds with an error.
  • Do not include passwords, API keys or private customer data. The object is processed on the server.

Limitations

  • Empty arrays become empty mappings. JSON [] is decoded on the server as an empty PHP array, which cannot be told apart from an empty object, so it is written as {}. Change it to [] by hand if your generator expects a list.
  • Deep nesting is inlined. Levels beyond the fourth are written in compact flow style. It is valid YAML, just less readable.
  • No comments. JSON has no comments, so the output has none either.
  • No validation against a schema. The tool checks JSON syntax, not whether your fields make sense to your site.
  • Needs a connection. Because generation uses the API, it will fail if you are offline; a toast shows the error message.

Related tools

Once the front matter is in place you can check how the body renders with Markdown Previewer, which hides the front matter block and shows only the content, or tidy blank lines in the body with Markdown Remove Empty Lines.

Frequently Asked Questions

FAQ

Short answers for the questions users ask before trusting the result.

A single valid JSON object. Arrays, plain strings, numbers and YAML are rejected, and the Input status card tells you which problem it found.

The JSON is validated in your browser, then sent to the site's API, where the Symfony YAML component converts it. The endpoint returns the YAML and does not save it.

Strings that look like dates are quoted so YAML keeps them as text. Remove the quotes after pasting if your site needs a native date value.

The server decodes JSON into PHP arrays, and an empty list cannot be told apart from an empty object, so it is written as an empty mapping. Edit it to [] if required.

Yes. The output always starts and ends with a --- line, so it is ready to paste at the top of a Markdown file.

It is standard YAML front matter, the format read by Jekyll, Hugo, Eleventy, Astro, Docusaurus and similar tools. You still need to use the field names your generator expects.

The front matter is saved as markdown-front-matter.md.

Comments (0)

For user discussion, edge cases, and follow-up tips.
Leave a comment
Your comment will appear publicly after submission.
No comments yet. Be the first to comment!
Let Us Know!
Report an issue with this tool

Describe the issue you encountered so we can investigate and improve the tool.

What helps most
Include the input, expected result, actual result, browser/device, and a screenshot when helpful.
The screenshot button captures the page in the browser and attaches the generated image to this form.
Full-page screenshot
Captured in your browser with newisty.
No screenshot captured yet.
Tool Report