Markdown Link Extractor
Runs 100% in your browserExtract every link, image URL, and reference from any Markdown document — with source-line numbers, URL type classification, duplicate detection, and CSV / JSON export. Does not crawl destinations. 100% client-side.
Markdown source
Extracted links
Load Markdown to see link text, URL, type, status, and source line.
Extraction review
ReadyNo history yet.
Frequently asked questions
The extractor recognises five link types: inline links <code>[text](url)</code>, inline images <code></code>, full reference-style links <code>[text][label]</code>, image references <code>![alt][label]</code>, and autolinks <code><https://example.com></code>. Collapsed references <code>[label][]</code> and shortcut references are also resolved. All reference definitions are collected on a first pass, so every reference type resolves correctly.
A reference link separates the link target from the link text. You write <code>[text][label]</code> inline and define the URL elsewhere: <code>[label]: https://example.com</code>. The extractor performs a two-pass parse — first collecting all definitions, then resolving every reference. Unresolved references (missing definitions) are flagged with an "unresolved" status badge and counted in the stats panel.
No. Links inside fenced code blocks (triple-backtick or triple-tilde) are excluded — they are treated as code examples, not active URLs. The parser tracks opening and closing fence markers and skips all content in between, regardless of what Markdown syntax appears there.
Each extracted link gets a status badge: <strong>external</strong> (https:// or http://), <strong>relative</strong> (path-relative URL), <strong>absolute-path</strong> (starts with /), <strong>fragment</strong> (#anchor), <strong>contact</strong> (mailto: or tel:), <strong>data</strong> (data: URI), <strong>other-protocol</strong> (custom schemes), <strong>unsafe</strong> (javascript:, vbscript:, or data:text/html — flagged with a red badge), and <strong>unresolved</strong> (reference with no definition).
Links using <code>javascript:</code>, <code>vbscript:</code>, or <code>data:text/html</code> protocols can execute code when clicked in certain renderers and are considered unsafe. The extractor flags them with a red warning badge and includes them in the "Unsafe" stat count. They also appear in the extraction review panel with a warning message.
An <strong>unsafe</strong> link has a valid URL but the URL uses a dangerous protocol (javascript:, vbscript:, data:text/html). An <strong>unresolved reference</strong> is a reference-style link (like <code>[text][label]</code>) whose definition (<code>[label]: url</code>) is missing from the document — the link would be rendered as plain text, not a clickable link. Both are flagged in the review panel and counted in their respective stats columns.
A URL is counted as a duplicate when the same URL string appears in two or more extracted links. The "Duplicates" stat shows how many distinct URLs appear more than once. Enabling the "Deduplicate URLs" checkbox in the filter bar reduces the visible results to one entry per URL (keeping the first occurrence by source order), while the stats always reflect the full count.
Every extracted link shows the line number (e.g. L14) where it appeared in the source Markdown. This lets you navigate directly to the link in your editor, which is especially useful when auditing large README files or documentation pages with hundreds of links.
Yes. Paste the raw Markdown content directly into the source pane — no upload or API call is needed. Everything runs in your browser. Alternatively, use the "Open .md" button to load a local file via the FileReader API. Neither action sends any data to a server, making it safe for private repositories or confidential documentation.
The Text Tool extracts inline links, reference-style links, images, and bare URLs — but it does not show source line numbers, does not classify URL protocols (safe/unsafe/relative/fragment etc.), does not detect unresolved references, does not count duplicates in a stats panel, and does not offer type-aware filters. ToolsSonic provides all of these features plus sort modes, a session history panel, and 7 export columns in CSV/JSON.
The CSV export contains 7 columns: <strong>type</strong> (link/image/reference/autolink), <strong>text</strong> (the visible link text or alt text), <strong>url</strong> (the resolved URL), <strong>title</strong> (the link title attribute if present), <strong>status</strong> (external/relative/unsafe/unresolved etc.), <strong>line</strong> (source line number), and <strong>reference</strong> (the reference label for reference-style links). All values are properly quoted per RFC 4180.
The JSON export is an array of objects, each containing the same 7 fields as the CSV export: type, text, url, title, status, line, and reference. The JSON is formatted with 2-space indentation, making it easy to pipe into other scripts or tools.
"All links" shows every extracted link. "Links only" shows inline links and autolinks. "Images only" shows inline images and image references. "References only" shows reference-style links and image references. "Unsafe + Unresolved" shows only links that need attention. The "Deduplicate URLs" checkbox collapses multiple links with the same URL to one row in the results table.
You can sort results by: <strong>Source order</strong> (the order links appear in the document, by line number), <strong>By URL</strong> (alphabetical by resolved URL), <strong>By text</strong> (alphabetical by link text), or <strong>By type</strong> (groups links, images, references, and autolinks together).
Each time you extract links, the source Markdown is saved to a session history (up to 8 entries). The history panel at the bottom of the tool shows each entry with a timestamp and a preview of the source. Clicking "Restore" reloads that source into the input pane and re-runs the extraction. History is stored in memory only — it is cleared when you close the tab.
Yes. Click the "Open .md" button to browse for a file on your computer. The tool accepts .md, .markdown, and .txt files. The file is read using the browser's FileReader API — it is never uploaded to a server. After loading, the extraction runs automatically.
Yes. Press <strong>Ctrl+Enter</strong> (or Cmd+Enter on Mac) while the source pane is focused to run the extraction immediately, bypassing the 280 ms debounce delay. The tool also re-extracts automatically 280 ms after you stop typing.
Yes. A UTF-8 BOM at the start of the document is stripped automatically before parsing begins, so it does not affect extraction results or line numbering.
Absolutely. Common use cases include: auditing README files before a release, building a link inventory for a documentation site migration, finding broken reference definitions in large Markdown projects, identifying javascript: links that should be blocked in a security review, and generating a CSV report of all external URLs for a link-checker pipeline.
Once the page is loaded, the tool works entirely offline. It uses no external APIs and requires no network connection to extract links, run filters, or export CSV/JSON. All logic runs in your browser's JavaScript engine.
The parser looks for Markdown link syntax, not HTML. Pasting HTML will produce no results unless the HTML happens to contain Markdown-style link notation. To extract links from HTML, use the HTML to Markdown tool first to convert it, then paste the Markdown output here.
No. The tool processes everything locally in your browser using JavaScript. Nothing is saved to localStorage, sessionStorage, or any server. When you close the tab, all data — including session history — is gone.
The tool has no hard limit. It processes the entire input on each keystroke (debounced to 280 ms). In practice, it comfortably handles README files and documentation pages with thousands of lines. For very large inputs (100 000+ characters) you may notice a brief processing delay, which is normal for client-side parsing.
What is Markdown Link Extractor?
What is a Markdown Link Extractor?
A Markdown Link Extractor scans a Markdown document and returns every hyperlink it contains — inline links, image URLs, reference-style links, autolinks, and more — as a structured list with type labels, source line numbers, and URL status badges. Instead of searching through a README manually or writing a one-off grep script, you paste the Markdown, press Ctrl+Enter, and get a full link inventory in under a second.
Common use cases include:
- README audits before a release — scan a project README for broken references, outdated URLs, or dangerous javascript: links before they reach your audience - Documentation migration — build a complete link inventory before moving content from one platform to another, so no link is accidentally dropped - API documentation review — verify that every endpoint example URL is correctly formed and consistently styled - Security reviews — find javascript:, vbscript:, and data:text/html links that could execute code in a Markdown renderer - Content audits — generate a CSV or JSON export of all external URLs for automated link-checking pipelines
The tool extracts all five Markdown link types: inline links [text](url), inline images , full reference-style links [text][label], image references ![alt][label], and autolinks <https://example.com>. Collapsed references [label][] and shortcut references are also resolved against the definition list collected on a first pass.
Critically, links inside fenced code blocks are excluded — they are code examples, not active URLs, and including them would pollute the results.
Features That Beat Every Competitor
ToolsSonic's Markdown Link Extractor provides capabilities that no other browser-based Markdown link tool offers:
Source-line reporting. Every extracted link shows the exact line number where it appears in the source. This means you can jump directly to L47 in your editor to fix a broken reference, rather than searching through a 500-line README. No other browser-based link extractor shows line numbers.
URL protocol classification with safety badges. Each link gets a status badge: external (https://), relative, absolute-path (/), fragment (#anchor), contact (mailto: / tel:), data URI, other-protocol (custom schemes), or unsafe. The unsafe badge is red and covers javascript:, vbscript:, and data:text/html — the three protocols that can execute code in a Markdown renderer.
Unresolved reference detection. Reference-style links ([text][label]) are only valid if a matching definition ([label]: url) exists in the document. The extractor performs a two-pass parse: first collecting all definitions, then resolving every reference. Any reference without a matching definition is flagged as "unresolved" — it would render as plain text, not a clickable link.
Duplicate URL counting. The stats panel shows how many distinct URLs appear more than once in the document. The "Deduplicate URLs" checkbox in the filter bar lets you collapse these to one row per URL for a clean, de-duped inventory.
Type-aware filters. The filter dropdown lets you view all links, links only, images only, references only, or unsafe+unresolved only — instantly, without re-parsing.
Sort modes. Sort by source order (line number), alphabetically by URL, by link text, or by type. Combined with the filter, this gives you the exact slice of the link inventory you need for any audit task.
7-stat panel. At a glance: Total links, Links, Images, References, Duplicates, Unresolved, and Unsafe. No need to manually count categories.
Session history panel. The last 8 extractions are remembered in-session. Click "Restore" on any entry to reload that source Markdown and re-run the extraction — useful when comparing multiple documents or iterating on a fix.
280 ms live debounce. Results update automatically as you type. The debounce prevents unnecessary reprocessing while you're mid-sentence, giving snappy feedback without hammering the CPU.
FileReader support. Click "Open .md" to load a local Markdown file directly in the browser. Supports .md, .markdown, and .txt. Nothing is uploaded — the file is read by the browser's FileReader API.
Copy and download. Copy the filtered link list as tab-separated text with one click, download as a CSV with 7 columns (type, text, url, title, status, line, reference), or download as a structured JSON array.
Explicit no-network, no-upload model. The privacy footer confirms that nothing leaves your device. Safe for private repositories, confidential documentation, and internal tools.
Understanding Markdown Link Types
Markdown supports five primary link notations, and understanding them helps you get the most from this tool:
Inline links [text](url) are the most common. The URL is written directly inside the parentheses. A title can follow the URL in quotes: [text](url "title").
Inline images  follow the same pattern as inline links but are prefixed with !. The extractor identifies them as type "image" and distinguishes them from hyperlinks.
Full reference-style links [text][label] separate the link text from the URL. The URL is defined elsewhere in the document: [label]: https://example.com. This notation is common in large documentation files where the same URL appears multiple times.
Collapsed references [label][] are shorthand for [label][label] — the label doubles as the link text. Shortcut references [label] (no trailing bracket) work the same way when a matching definition exists.
Autolinks <https://example.com> are bare URLs or email addresses wrapped in angle brackets. The extractor identifies these as type "autolink" and assigns a mailto: prefix to email autolinks.
Reference definitions [label]: url "title" are not links themselves — they are the lookup table for reference-style links. The extractor collects all definitions on a first pass and uses them to resolve references. Definitions are excluded from the output table.
Fenced code blocks (triple-backtick or triple-tilde) are tracked with a fence-character-aware parser. Any link syntax inside a fence — even perfect Markdown link notation — is excluded from extraction. This prevents code examples from polluting the link inventory.
Common use cases
- Auditing a project README for broken references before a GitHub release
- Building a link inventory for a documentation site migration
- Finding javascript: and vbscript: links in Markdown content that accepts user input
- Generating a CSV of all external URLs for a link-checker pipeline
- Identifying unresolved reference-style links in large Markdown projects
- Extracting image URLs from a Markdown document for a CDN audit
- Reviewing API documentation to verify consistent URL patterns
- Counting duplicate links to find redundant anchor text in SEO content
Why use ToolsSonic's Markdown Link Extractor?
ToolsSonic's Markdown Link Extractor is the only browser-based local source-audit workspace that combines source-line reporting, URL protocol classification (safe/unsafe/relative/fragment/contact/data/other-protocol), unresolved reference detection, duplicate URL counting, type-aware filters, sort modes, a 7-stat panel, session history with restore, 280 ms live debounce, FileReader file loading, and 7-column CSV/JSON export — all in a single client-side tool with no upload and no server. It does not crawl destinations or make network requests. Competitors offer basic link extraction without line numbers, without protocol safety classification, and without the ability to find unresolved references that would silently become broken links in a rendered document.
Markdown Link Type Reference
The table below maps every Markdown link notation to the type label used in the extractor's results table, with an example and notes on how each is handled.
| Type label | Markdown notation | Example | Notes |
|---|---|---|---|
| link | [text](url) | [Docs](https://docs.io) | URL parsed from parentheses; optional title in quotes extracted |
| link | [text](url "title") | [Docs](https://docs.io "ToolsSonic Docs") | Title captured and shown as column 4 in CSV export |
| image |  |  | Alt text shown in Text column; type badge = "image" |
| image |  |  | Title captured |
| reference | [text][label] | [GitHub][gh] | Resolved against [gh]: url definition |
| reference | [label][] | [GitHub][] | Collapsed form; label used as text |
| image-ref | ![alt][label] | ![Logo][logo-ref] | Image reference; type badge = "image-ref" |
| autolink | <https://url> | <https://toolssonic.com> | Bare URL in angle brackets |
| autolink | <email@domain> | <hello@toolssonic.com> | Email autolink; URL stored as mailto:email |
| unresolved | [text][missing] | [Broken][missing-ref] | Definition not found; status = "unresolved"; flagged in review panel |
ToolsSonic vs Competitors — Markdown Link Extractor Feature Comparison
| Feature | ToolsSonic | The Text Tool | VS Code Extension | Dillinger / StackEdit | |---|---|---|---|---| | Browser-based, no install | ✅ | ✅ | ❌ (IDE plugin) | ✅ (cloud) | | Source line numbers | ✅ | ❌ | ✅ | ❌ | | URL protocol classification | ✅ (9 statuses) | ❌ | ❌ | ❌ | | Unsafe link detection | ✅ (javascript:/vbscript:/data:) | ❌ | ❌ | ❌ | | Unresolved reference detection | ✅ | ❌ | ✅ | ❌ | | Duplicate URL count | ✅ | ❌ | ❌ | ❌ | | Type-aware filters | ✅ (5 modes) | ❌ | ❌ | ❌ | | Sort modes | ✅ (4 modes) | ❌ | ❌ | ❌ | | 7-stat panel | ✅ | ❌ | ❌ | ❌ | | Session history with restore | ✅ (8 entries) | ❌ | ❌ | ❌ | | CSV export | ✅ (7 columns) | ✅ | ❌ | ❌ | | JSON export | ✅ | ❌ | ❌ | ❌ | | File upload / open | ✅ (FileReader) | ✅ | ✅ | ✅ | | No upload / client-side only | ✅ | ✅ | ✅ | ❌ (cloud) | | Fenced-code exclusion | ✅ | ✅ | ✅ | N/A | | Free, no account | ✅ | ✅ | Free | Freemium |
Related tools
Markdown Formatter
Editor's choiceFormat Markdown locally with consistent headings, lists, blank lines, blockquotes, tables, code fences, GFM task lists, strikethrough, diagnostics, history, preview, copy, and download.
HTML to Markdown
Editor's choiceConvert clean HTML back to Markdown — headings, bold, italic, code, tables, lists, links, images, and blockquotes with full GFM support.
Markdown to HTML
Editor's choiceConvert Markdown to clean, structured HTML locally — headings, paragraphs, links, images, lists, tables with column alignment, nested lists, task lists, blockquotes, setext headings, and fenced code with a sanitized preview.
Markdown Editor
Editor's choiceFull-featured online Markdown editor with live GFM preview, formatting toolbar, starter templates, find & replace, focus mode, 13-stat panel, history, and three download formats — free, private, no account.
Markdown Checklist Generator
Editor's choiceBuild GitHub-compatible Markdown checklists visually — add tasks, indent subtasks, group under headings, import plain text or existing GFM, mark progress, preview, and download .md or .html. Free, 100% browser-local, no upload.
Markdown TOC Generator
Editor's choiceGenerate a linked table of contents from any Markdown document — ATX and Setext headings, anchor-safe GitHub slugs, duplicate disambiguation, hierarchical numbering.