Categories

Markdown Link Extractor

Extract inline links, reference links, and bare URLs from Markdown documents with basic syntax validation

Features

Extracts and analyzes various link types from Markdown content:

  • Inline Links: [text](url) or [text](url "title")
  • Reference Links: [text][ref], [text][ref], collapsed [ref][]
  • Reference Definitions: [ref]: url "title"
  • Image Links: ![alt](url) or ![alt](url "title")
  • Autolinks: <url>
  • Bare URLs: http://, https://, www. URLs without Markdown syntax

Validation

  • URL syntax validation
  • Duplicate link detection
  • Broken reference link detection
  • Unused reference definition warnings

Output

Provides comprehensive statistics including:

  • Link counts by type
  • Unique vs duplicate URLs
  • Internal vs external links
  • Anchor/fragment detection
  • Issue reporting for broken or invalid links

Count and track links with # anchors

Key Facts

Category
Text Processing
Input Types
textarea, select, checkbox
Output Type
json
Sample Coverage
4
API Ready
Yes

Overview

The Markdown Link Extractor is a utility tool that parses Markdown documents to extract and validate various link types, including inline, reference, and bare URLs, providing detailed statistics and issue reports for efficient link management.

When to Use

  • When auditing Markdown documentation to identify broken, duplicate, or invalid links.
  • When preparing Markdown content for migration to another platform or format, requiring a full link inventory.
  • When analyzing link structures in Markdown files for SEO optimization or maintenance tasks.

How It Works

  • Input your Markdown content via the text area or file upload option.
  • Select the types of links to extract, such as inline, reference, bare URLs, images, or autolinks.
  • Configure validation settings like URL syntax checking, duplicate detection, and anchor extraction.
  • Receive a JSON output with extracted links, counts by type, validation results, and any detected issues.

Use Cases

SEO auditing of Markdown-based websites to find and fix broken or duplicate links.
Content migration projects to extract all links for updating references in a new system.
Documentation maintenance to validate reference links and ensure consistency across files.

Examples

1. Blog Post Link Audit

Content Manager
Background
A content manager needs to review a Markdown blog post before publication to ensure all links are valid and not duplicated.
Problem
The post contains numerous inline and bare URLs, making manual checking inefficient and prone to errors.
How to Use
Paste the Markdown content into the input area, select 'inline' and 'bare' link types, and enable URL validation and duplicate checking.
Example Config
{"linkTypes": ["inline", "bare"], "validateUrls": true, "checkDuplicates": true}
Outcome
A JSON report listing all extracted links with their validation status and duplicates, allowing quick corrections before publishing.

2. Reference Link Consolidation

Technical Writer
Background
A technical writer is converting a Markdown user guide to another format and needs to extract all reference links for updating.
Problem
Reference links are defined separately in the document, and manually listing them is time-consuming.
How to Use
Input the Markdown file, choose 'reference' link type from the options, and sort results by URL for organization.
Example Config
{"linkTypes": ["reference"], "sortBy": "url"}
Outcome
A sorted JSON list of all reference links with their definitions, facilitating easy integration into the new format.

Try with Samples

markdown

Related Hubs

FAQ

What link types are supported for extraction?

The tool extracts inline links, reference links, bare URLs, image links, and autolinks from Markdown content.

How does URL validation work?

It checks the syntax of URLs to ensure they are properly formatted, but does not verify if the URLs are accessible or live.

Can I extract only specific link types?

Yes, you can select which link types to include using the 'Link Types to Extract' multi-select option.

What output format is provided?

The output is in JSON format, including link details, statistics, and validation reports for easy parsing.

Is there a limit on the input size?

The tool handles typical Markdown documents, but very large files may impact processing time and performance.

API Documentation

Request Endpoint

POST /en/api/tools/markdown-link-extractor

Request Parameters

Parameter Name Type Required Description
markdownInput textarea Yes -
linkTypes select No -
validateUrls checkbox No -
checkDuplicates checkbox No -
sortBy select No -
extractAnchors checkbox No Count and track links with # anchors

Response Format

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON Data: JSON Data

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-markdown-link-extractor": {
      "name": "markdown-link-extractor",
      "description": "Extract inline links, reference links, and bare URLs from Markdown documents with basic syntax validation",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=markdown-link-extractor",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]