Skip to content
All posts
4 min read
markdown
tutorial
json
tables
data

Markdown for Data: JSON, Tables, Code & Task Extraction (2026)

A tutorial on Markdown as a data format — convert JSON to tables or lists, sort and transpose tables, extract every code block as a file, and track task-list progress for content pipelines.

Markdown is more structured than it looks. Tables are data grids, fenced code blocks are embedded files, and task lists are checklists with state. This tutorial covers the data & structure tool group — turning JSON into Markdown, manipulating tables, extracting code, and tracking tasks — the utilities that make Markdown a workable format in content and data pipelines.

The data toolkit

TaskTool
JSON → MarkdownJSON to Markdown
Sort / transpose tablesTable transformer
Extract code blocksCode block extractor
Track task listsTask list tracker

Part 1: JSON → Markdown

The JSON to Markdown tool renders JSON as either a GitHub-flavored pipe table or a nested unordered list — perfect for documenting:

  • API responses
  • package.json and config files
  • Bug reports with structured data
{ "name": "atlas", "version": "2.4.0", "license": "MIT" }

…becomes a clean table or list, deterministically. This is often better than asking an LLM to format the table — it can't hallucinate or miscount columns. (See validating LLM Markdown for why deterministic conversion wins.)

The reverse and related conversions live in the convert tools; for spreadsheets specifically, use CSV/TSV ↔ table.

Part 2: Manipulating tables

Once you have a Markdown table, the table transformer edits it structurally:

  • Sort rows by any column.
  • Reorder or remove columns.
  • Transpose (swap rows and columns).

This beats hand-editing pipes — try transposing a 6-column table by hand and you'll appreciate the tool. Output is clean GFM ready to paste. For building tables from scratch, use the table generator; for the full theory, see the table guide.

Part 3: Extracting code blocks

A tutorial or README often contains a dozen fenced code blocks. The code block extractor pulls every fenced snippet by language and lets you:

  • Copy each block individually.
  • Download each as a real source file with the correct extension (.js, .py, .sql…).

Use cases:

  • Testing docs — extract code from a README and run it to verify it still works.
  • Migrating examples — turn doc snippets into a samples folder.
  • Auditing — review what code your docs actually ship (and check it for secrets).

The code blocks guide covers fence languages and highlighting.

Part 4: Tracking task lists

GitHub task lists (- [ ] / - [x]) are checklists with state. The task list tracker extracts them from a document and shows:

  • Completion percentage.
  • Tasks grouped by heading.
  • A copyable list of just the open items.

Great for project READMEs, release checklists, and planning docs where the Markdown is the project tracker. It pairs with the changelog helper when you're closing out a release.

A real pipeline: docs from structured data

Generating documentation from a data source:

  1. Fetch your data as JSON.
  2. Convert to a Markdown table — JSON to Markdown.
  3. Sort/transpose for readability — table transformer.
  4. Assemble into a doc with the editor.
  5. Verify examples by extracting and running code — code block extractor.
  6. Track the doc's TODOs — task list tracker.

Markdown becomes a thin, version-controllable layer over your structured data.

Automating with the API

JobEndpoint
JSON → Markdown/api/v1/convert/json-to-markdown
CSV → table/api/v1/convert/csv-to-table
Table → CSV/api/v1/convert/table-to-csv
Extract code blocks/api/v1/extract/code-blocks
Extract tasks/api/v1/extract/tasks

Example — generate a Markdown table from a JSON API response in a build script:

curl -sf -X POST https://trymarkdownviewer.com/api/v1/convert/json-to-markdown \
  -H "Authorization: Bearer $MDV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"json": "[{\"id\":1,\"name\":\"Atlas\"}]", "format": "table"}'

Common mistakes

1. Asking an LLM to format tables. It can miscount columns — use deterministic JSON to Markdown.

2. Hand-transposing tables. Error-prone past a few columns — use the transformer.

3. Untested doc code. Extract and run it; docs rot when examples break.

4. Secrets in extracted code. Audit extracted snippets with the redaction helper before sharing.

5. Stale task lists. Track completion so a "done" project isn't full of unchecked boxes.

Quick reference

NeedTool
JSON → MarkdownJSON to Markdown
Sort/transpose tableTable transformer
Extract codeCode block extractor
Track tasksTask list tracker

Markdown is data with a friendly face. Convert JSON into tables, manipulate those tables structurally, extract code as real files, and track task progress — by hand for one document, or via API across a whole pipeline.

Written by Markdown Viewer Team. Found this useful? Try the editor →

Keep reading

Hand-picked articles related to this one.