Query a Markdown Document
Paste Markdown and pull out every heading, link, image, code block, or table — as plain text, JSON, or reconstructed Markdown. Runs entirely in your browser: no upload, no sign-up.
About this tool
Markdown Query is a small "jq for Markdown": paste a Markdown document, choose what you want, and get just those pieces back. Pick an element type — headings, links, images, code blocks, or tables — and the tool parses the document and pulls out every match. It understands standard CommonMark plus GitHub-flavored pipe tables, so inline and reference links, autolinks, fenced code with a language tag, and multi-column tables all come through correctly.
Choose how the results come out: Text for a quick human-readable list, JSON
for a structured { count, items } payload you can feed to a script, or Markdown
to get clean, reconstructed snippets you can paste elsewhere. Turn on source line
numbers to see exactly where each item lives in the original document — handy for
linting docs, auditing links, or building a table of contents.
Everything runs locally in your browser through a WebAssembly parser. Your Markdown is never uploaded, there is no sign-up, and the output is fully deterministic — the same input always produces the same result.
FAQ
What can I extract from my Markdown?
Five element types: headings (with their level), links (text plus the destination URL and any title), images (alt text plus the source URL), code blocks (the code plus its language, if the fence has one), and tables (the header row plus every body row). Pick one at a time from the Extract control.
What is the difference between the Text, JSON, and Markdown formats?
Text gives a compact, human-readable listing — one item per line, with code and
tables shown as blocks. JSON returns a structured object with a count and an
array of items, ideal for scripting. Markdown rebuilds each match as valid
Markdown (for example [text](url) for links or a fenced block for code) so you can
paste it straight into another document.
Does it handle tables and fenced code blocks?
Yes. Tables use GitHub-flavored pipe syntax, and column alignment is preserved when
you export back to Markdown. Fenced code blocks keep their language tag (```rust),
and indented code blocks are captured too — they just report an empty language.
What do the source line numbers show?
When Include source line numbers is on, each item is annotated with the 1-based
line in your original Markdown where it begins. In JSON output this appears as a
line field; in text and Markdown output it is shown as a small prefix or comment.
It is useful for linting, auditing links, or jumping back to the source.
Is my Markdown uploaded anywhere?
No. The parser is compiled to WebAssembly and runs entirely in your browser. Nothing is sent to a server, there is no sign-up, and the same input always yields the same output.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool markdown-query '# Title
See the [docs](https://example.com "Docs") and the .
```rust
let x = 1;
```
| a | b |
|---|---|
| 1 | 2 |'New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/markdown-query/?markdown=%23%20Title%0A%0ASee%20the%20%5Bdocs%5D%28https%3A%2F%2Fexample.com%20%22Docs%22%29%20and%20the%20%21%5Blogo%5D%28logo.png%29.%0A%0A%60%60%60rust%0Alet%20x%20%3D%201%3B%0A%60%60%60%0A%0A%7C%20a%20%7C%20b%20%7C%0A%7C---%7C---%7C%0A%7C%201%20%7C%202%20%7C&extract=headings&format=text&include_line_numbers=trueMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
