String Utilities Công cụ đã được cập nhật 3 tuần trước

Markdown Link Extractor

Extract the links from a Markdown document into a table and JSON. The tool collects Markdown links with their text, URL and optional title, plus bare http and https addresses, while skipping fenced code blocks. Copy the array or download it as markdown-links.json for audits and migrations.

Luôn miễn phí Dễ sử dụng Kết quả ngay lập tức Riêng tư và an toàn

Sử dụng Markdown Link Extractor

Công cụ trích xuất liên kết Markdown

Trích xuất văn bản liên kết, URL và tiêu đề (tùy chọn) từ nội dung Markdown sang định dạng JSON có cấu trúc.

Nhập Markdown

Dán các liên kết Markdown vào đây

Các liên kết đã trích xuất

Văn bản liên kết, URL và tiêu đề (tùy chọn)
Văn bản URL Tiêu đề
Chưa trích xuất được liên kết nào.
Mẹo về liên kết
Các liên kết Markdown tiêu chuẩn như [text](url) và [text](url "title") được hỗ trợ. Dữ liệu JSON đã trích xuất rất hữu ích cho các hoạt động kiểm toán, di chuyển dữ liệu và xác thực nội dung.
Liên kết công cụ
Đã sao chép vào khay nhớ tạm.
Hãy giúp cải thiện công cụ này

Đọc nội dung

Tìm hiểu cách thức hoạt động của công cụ này và khi nào nên sử dụng nó.

List every link in a Markdown file

A long README, a knowledge-base article or a set of course notes can hold dozens of links: references to documentation, download pages, internal sections, email addresses and bare URLs pasted straight into the text. The Markdown Link Extractor finds them and lists each one with its anchor text, its address and its optional title. You get a readable table for a quick look and a JSON array you can copy or download for audits, migrations and link checks.

Two kinds of links are collected

The extractor runs two separate passes over the text outside code fences. Images are blanked out first, so they never appear in the results:

  1. Markdown links in the form [text](url) or [text](url "title"). These come out with their text, URL and title. Relative paths, anchors such as #install, and mailto: addresses are all captured this way.
  2. Bare web addresses starting with http:// or https:// anywhere else in the text, including autolinks like <https://example.com>. Markdown links found in the first pass are removed before this pass runs, so their URLs are not counted again. These come out with the URL only, and text set to null.

Each result is an object such as:

{"text": "Docs", "url": "https://example.com/docs", "title": "Read the docs"}

Within each stretch of text between code fences, the Markdown links are listed first and the bare addresses follow.

Each link is listed once

A link written as [Docs](https://example.com/docs) produces one entry, with the text "Docs", because the bare-address pass skips URLs that already belong to a Markdown link. A URL appears more than once only when your document really contains it more than once, for example two links to the same page with different anchor text. The tool does not merge those, so de-duplicate the JSON by URL if you want one row per address.

To find addresses that were pasted as bare URLs, look for entries with text set to null.

Other behaviour worth knowing

  • Images are excluded. An image such as ![Logo](logo.png) is removed before either pass, so neither the image file nor its alt text is listed. Use the Markdown Image Extractor for images.
  • Reference-style links such as [guide][1] are not captured as links. If the definition line [1]: https://example.com holds a web address, that address is picked up by the bare-URL pass, without text.
  • Fenced code blocks are skipped, but inline code in single backticks is not, so a link shown as an example inside backticks is still listed.
  • Titles must be in double quotes to be recognised.
  • Angle brackets around a URL are trimmed from the result.

A sample run

Consider this paragraph: Read the [guide](https://example.com/guide), email [support](mailto:[email protected]), or visit https://example.com/status for uptime. ![Logo](https://example.com/logo.png) The extractor returns three entries. First come the two Markdown links: "guide" pointing to https://example.com/guide and "support" pointing to the mail address. Then comes the bare address https://example.com/status with no text. The guide URL is not repeated as a bare address, and the logo image is not listed at all.

Step-by-step guide

  1. Paste your Markdown into Input Markdown, or press Paste in the header.
  2. Check the "possible links" counter in the footer. It is a quick browser-side estimate of Markdown links only.
  3. Press Extract. The button reads "Working" while the request runs.
  4. Read the Extracted Links table, which shows Text, URL and Title for each entry. Web addresses, mail and phone links, root-relative paths and anchors are clickable and open in a new tab.
  5. Copy the array with the copy icon (Copy JSON), or save it as markdown-links.json with the download icon (Download JSON).
  6. Clear the input and results with the trash icon.

Server processing

The extraction is done on this site's server. When you press Extract your Markdown is sent there, both passes run, and the list returns to your browser. The tool does not visit or test any of the links. Each request accepts up to 200,000 characters; anything longer is rejected with an error message, so split very large documents first.

Where a link list helps

Link audits before publishing

Export the list, then open or check each URL. It is much easier to work through a column of addresses than to hunt for links in rendered text.

Domain and site migrations

When a product moves from one domain to another, the URL list shows every reference to the old domain that needs rewriting, including bare URLs that are easy to overlook.

Reviewing outbound references

Editors and SEO teams can see at a glance which external sites a page points to and whether the anchor text describes them well. Vague anchors such as "here" or "click this" stand out in the Text column.

Building a reading list or bibliography

Researchers and students can pull every source from a set of notes into one file, then format it however they need.

Checking internal navigation

Relative links and anchors show how a document set links to itself. Missing or misspelled paths are easier to spot in a sorted list.

Tips

  • De-duplicate by URL after exporting if the same address is linked several times and you want one row per address.
  • Write links in Markdown form rather than as bare URLs when you want anchor text in the export; bare addresses come out with text set to null.
  • Avoid spaces in link targets. A URL containing a space is not matched by the Markdown link pattern; encode it as %20.
  • Expect a bare URL followed by a period at the end of a sentence to include that period. Check URLs at sentence ends.

What not to expect

  • No broken-link checking. The extractor lists links; it does not fetch them.
  • No HTML link detection. Anchor tags written as <a href="..."> contribute only their bare http or https address, without text.
  • No automatic de-duplication or sorting.
  • No image listing; images are skipped.

Limitations

  • Repeated links to the same address are each listed; there is no merging.
  • Reference-style links lose their text.
  • Bare addresses are matched only when they start with http or https; addresses like www.example.com on their own are missed.
  • Input is capped at 200,000 characters and processed on the server.
  • JSON is the only export format.

Related tools

To actually test whether each address responds, use the Markdown Broken Link Checker. If you need the links removed but their text kept, Markdown Strip Links does that, and the Markdown Image Extractor lists images on their own.

Frequently Asked Questions

Câu hỏi thường gặp

Các câu trả lời ngắn gọn cho những thắc mắc mà người dùng thường đặt ra trước khi tin tưởng vào kết quả.

Only because it occurs twice in your Markdown, for example in two separate links. Each Markdown link is listed once, and its URL is not picked up again as a bare address. De-duplicate by URL if you need one row per address.

Yes. Any address starting with http or https is listed, with the text field set to null.

No. Markdown images are removed before links are collected, so neither the image address nor its alt text is listed. Use the Markdown Image Extractor to list images.

No. It only lists links. Use a broken link checker to test whether each address responds.

Links inside fenced code blocks are skipped. Links shown in inline code with single backticks are still extracted.

It is sent to this site's server for extraction and the results are returned to your browser. Each request accepts up to 200,000 characters.

markdown-links.json is an array of objects with text, url and title keys, in the order the links were found.

Bình luận (0)

Dành cho các cuộc thảo luận của người dùng, các trường hợp ngoại lệ và các mẹo bổ sung.
Để lại bình luận
Bình luận của bạn sẽ được hiển thị công khai sau khi gửi.
Chưa có bình luận nào. Hãy là người đầu tiên bình luận!
Hãy cho chúng tôi biết!
Báo cáo sự cố liên quan đến công cụ này

Hãy mô tả vấn đề mà bạn gặp phải để chúng tôi có thể tìm hiểu và cải thiện công cụ này.

Điều gì hữu ích nhất
Vui lòng cung cấp thông tin về dữ liệu đầu vào, kết quả mong đợi, kết quả thực tế, trình duyệt/thiết bị và ảnh chụp màn hình (nếu có thể).
Nút chụp màn hình sẽ chụp lại trang web trong trình duyệt và đính kèm hình ảnh được tạo ra vào biểu mẫu này.
Ảnh chụp màn hình toàn trang
Được ghi lại trên trình duyệt của bạn bằng newisty.
Chưa có ảnh chụp màn hình nào được chụp.
Công cụ Báo cáo