Skip to content
AZ Tools

Markdown Link Extractor

Pull every link and image out of a Markdown document — inline, reference-style, autolinks — into a CSV/JSON/MD list with text, URL, and title.

TypeTextURLTitle
imagealt texthttps://example.com/cat.pngCute cat
linka regular linkhttps://example.comExample homepage
linkdocshttps://docs.example.com
linkhelphttps://help.example.comHelp center
linkhttps://example.orghttps://example.org

Output (5 items)

type,text,url,title
image,alt text,https://example.com/cat.png,Cute cat
link,a regular link,https://example.com,Example homepage
link,docs,https://docs.example.com,
link,help,https://help.example.com,Help center
link,https://example.org,https://example.org,

Reference links resolve against [id]: url definitions in the same document. Bare URLs that are not wrapped in angle brackets (<…>) are skipped.

How to use

  1. Paste a Markdown document or section.
  2. Toggle whether images (![…](…)) are included.
  3. Pick CSV, JSON, or Markdown list output; copy and feed into your downstream tool.

About this tool

Show

Paste Markdown and get every link out of it as structured data: inline links, images, reference-style links with their definitions resolved, and bare autolinks. Each row carries a type, the link text or alt text, the destination and the title if there was one, and the whole table can be copied back out as JSON, CSV or a plain Markdown list. Reference definitions are collected first and removed from the body, so a definition line never shows up a second time as an inline link.

This is a regular-expression extractor rather than a CommonMark parser, and the difference is visible at the edges. A destination containing an unescaped closing parenthesis stops early — a Wikipedia URL ending in _(planet) comes out truncated at _(planet, which is the single most common surprise. A link nested inside another, as in [![logo](logo.png)](https://example.com), reports the image correctly but loses the outer destination, because the link pattern cannot span the image's own closing bracket. Autolinks are matched only for http and https, so <mailto:…> is skipped. And nothing here knows what a code span is, so a link written inside backticks as an example is extracted along with the real ones.

None of that makes the output useless — it makes it a first pass. For inventorying outbound links before an SEO audit, pulling every image out of a README before moving to a new CDN, or building a list of URLs to check for rot, a quick extraction you then eyeball is exactly the right tool. For anything that must be exactly right, reconcile the count against the rendered page.

The extraction happens in your browser, which is the reason this is usable on documentation you cannot paste into a hosted service. Nothing is uploaded, and the CSV export quotes any field containing a comma, a quote or a newline, so link text with punctuation in it survives the trip into a spreadsheet intact.

Frequently asked questions

Which link syntaxes are recognized?

Inline [text](url) with optional "title" or 'title'; reference [text][id] resolved via [id]: url "title" definitions; shortcut [text][]; image equivalents with ! prefix; and HTML-style autolinks <https://…>. Bare URLs not wrapped in <> are intentionally skipped because they're ambiguous in CommonMark.

Why is a link missing from the output?

Most common reasons: the URL spans multiple lines (Markdown disallows that), there's a stray space between ] and (, or it's a reference link whose definition uses a different ID than the reference. The recognized set follows CommonMark's relaxed rules but isn't a full parser.

Does this fetch the URLs?

No — it only extracts what's in the text. To verify links are alive, pipe the output into a link-checker (lychee, markdown-link-check, your favorite Node tool).

What about Markdown inside code blocks?

The parser doesn't skip fenced code blocks, so [example](https://x) inside a block fenced with three backticks will still be picked up. If that's a problem for your input, strip code blocks first with sed or a Markdown AST tool.

Related tools