Table extraction · Front matter · Code snippets — 3 modes

Convert Markdown to JSON
Tables, front matter
or parse in code.

Extract JSON from Markdown pipe tables, parse YAML front matter to a JSON object, or get ready-to-run Python and JavaScript snippets for Markdown parsing. Three modes, one tool.

Your data never leaves your browser
Pipe table → JSON array
YAML front matter → JSON
python-frontmatter & remark snippets
Always free
Markdown to JSON — 3 modes   100% client-side
Markdown input
  JSON ready

      
Three ways to convert Markdown to JSON

Each mode targets a different Markdown structure and use case.

Mode 1 — Markdown Table

Parse any GFM pipe table to a JSON array of objects. Column headers come from the first row, before the separator. Supports multiple tables in the same document. Numbers and booleans are type-coerced automatically.

Input
| name  | age |
| ----- | --- |
| Alice | 30  |
| Bob   | 25  |
Output
[{"name":"Alice","age":30},
 {"name":"Bob","age":25}]
Mode 2 — YAML Front Matter

Extract and parse the YAML front matter block from a Markdown file. The --- delimited block at the top is parsed as YAML and output as a JSON object. Optionally include the body content as a content field.

Input
---
title: My Post
date: 2024-01-15
tags: [api, json]
---
# Post content here
Output
{"title":"My Post",
 "date":"2024-01-15",
 "tags":["api","json"]}
Mode 3 — Code Snippets

Get ready-to-run code for parsing Markdown to JSON. Covers Python (python-frontmatter, pandas), Node.js (gray-matter, remark+GFM) and vanilla browser JavaScript. Each snippet handles the full workflow — read file, parse, output JSON.

Python snippet
import frontmatter, json
post = frontmatter.loads(text)
data = dict(post.metadata)
print(json.dumps(data))
When do you need Markdown to JSON?

The four most common workflows where Markdown data becomes JSON.

Static site generators

Jekyll, Hugo, Gatsby, Astro and Eleventy all use YAML front matter in Markdown files to store page metadata — title, date, tags, author, slug. Mode 2 extracts that front matter as JSON — useful for build scripts, search indexes, sitemap generators and CMS migrations.

GitHub README data tables

README files often contain pipe tables with project data — contributor lists, API endpoint references, config option tables. Mode 1 extracts those tables as JSON arrays — useful for generating dynamic documentation, feeding a search index or importing into a database.

CMS migration

Migrating from a file-based CMS (Jekyll, Hugo, Gatsby) to a headless CMS (Contentful, Sanity, Strapi) requires converting Markdown files with front matter to JSON objects that the CMS API can import. Mode 2 extracts the front matter for each file — the first step in a bulk migration script.

n8n and automation

n8n workflows that receive Markdown content from webhooks, Notion exports or CMS APIs often need to extract structured data from pipe tables or front matter. Mode 1 or 2 gives you the JSON structure your downstream workflow nodes expect — paste a sample and verify before building the automation.

Related tools
Popular searches
markdown to json convert markdown to json markdown table to json md to json converter markdown to json online markdown to json python markdown frontmatter to json parse markdown to json yaml frontmatter to json n8n markdown to json markdown to json javascript markdown to json npm

Markdown parsed in
your browser. No upload.

The table and front matter modes run entirely in JavaScript — no external library, no server round-trip. Your Markdown is parsed locally and the JSON is built in memory. The code snippets are generated statically from your language selection.

The front matter parser handles the full YAML subset used in static site generators: strings, numbers, booleans, null, arrays and nested objects — covering Jekyll, Hugo, Gatsby, Astro and Eleventy front matter conventions.

GFM pipe table parser
Parses standard GFM pipe tables — the same format used in GitHub READMEs, GitLab wikis and any GFM-compatible Markdown renderer.
YAML front matter
Extracts and parses the --- delimited YAML block — handling strings, numbers, booleans, arrays and nested objects from any static site generator.
Production-ready snippets
python-frontmatter, pandas, gray-matter and remark — the standard libraries for Markdown parsing in Python and JavaScript ecosystems.
47 tools, always free
No file size limits, no watermarks, no account. Funded by non-intrusive display advertising only.
Frequently asked questions
Common questions about converting Markdown to JSON.
How do I convert a Markdown table to JSON?
Select the MD Table mode, paste your Markdown containing a pipe table, and click Extract. The tool parses the header row (before the separator line of dashes) and outputs a JSON array of objects — one per data row, with column headers as keys.
How do I extract YAML front matter as JSON?
Select the Front Matter mode and paste your Markdown file — including the --- delimited block at the top. The tool extracts the YAML between the first pair of --- delimiters and parses it to a JSON object. Enable "Include body content" to add the Markdown body as a content field.
How do I parse Markdown to JSON in Python?
For front matter: pip install python-frontmatter, then import frontmatter; post = frontmatter.loads(text); data = post.metadata. For tables: use pandas with pd.read_table(StringIO(table_text), sep='|'). Select the Code Snippets mode to get the complete script.
How do I parse Markdown front matter in Node.js?
Use gray-matter: npm install gray-matter, then const matter = require('gray-matter'); const { data, content } = matter(markdownString). data is a JavaScript object with the front matter fields. Select the Code Snippets mode to get the complete Node.js script.
Is the Markdown to JSON converter free?
Yes, completely free. No file size limits, no account required. JSONshift is funded by non-intrusive display advertising.
Go up