Skip to content

Link Extractor

✨ Finds links as you type 0 lines · 0 B

    Paste HTML on the left

    Every link, image and email address in it will show up here
    Nothing to read yet

    HTML Link Extractor – Get All Links, Images and Emails from HTML

    What Does It Do?

    Paste a page’s HTML and this tool lists every address in it. The Links tab shows each <a href> with its text, whether it’s internal or external, and its rel values like nofollow. Images lists every picture the page uses, from plain <img src> to each size in a srcset. Emails picks up mailto: links and addresses written in the text, and Other covers scripts, stylesheets, iframes, video and forms.

    It’s handy for an SEO check, for moving a site (which links will break?), for collecting the images on a page, or just for finding that one link in a wall of markup. The HTML is only read, never run, and nothing in it is opened or downloaded. It all happens in your browser.

    How to Extract Links from HTML

    Four steps. Click Sample in the tool to follow along with a small bakery blog post.

    Step 1 Get the Page’s HTML

    This tool can’t open a web address for you, because browsers don’t let one site read another site’s pages. Getting the HTML yourself only takes a moment:

    • View source: open the page and press Ctrl+U (Mac: Cmd+Option+U). Select all and copy.
    • Save the page: press Ctrl+S (Mac: Cmd+S) and save it as an .html file, then open that file here.
    • Inspect: for pages that build their content with JavaScript, right-click the page, choose Inspect, right-click the <html> line and pick Copy > Copy outerHTML. That copies the page as it looks right now.

    Step 2 Paste or Open It

    Paste into the left panel, click the upload button, or drag an .html file onto the tool. The list on the right fills in as you type. If the HTML has a canonical link, an og:url or a <base href>, the page’s address goes into the Base URL box by itself.

    Step 3 Narrow It Down

    • Tabs: Links, Images, Emails or Other. The number on each tab is how many it found.
    • Show: only internal links, only external, only nofollow, or the “Not real links” that can’t work as written.
    • Search: type part of a URL or link text, like wikipedia or .pdf.
    • Sort: keep the order of the page, sort A to Z, or group by domain.
    • Options: “Remove duplicates” (on by default) shows each address once with a count like ×3. “Resolve relative URLs” turns /menu into a full address.

    Step 4 Copy or Download

    • Copy URLs: every address in the list, one per line. Good for a spreadsheet, a crawler or a redirect plan.
    • Markdown: a bullet list of [text](url) links, ready for a README or notes. javascript: and data: addresses are written as plain text, so they never turn into clickable links.
    • CSV: a spreadsheet with the URL, text, type, rel, target and how many times it appears.

    The exports follow what you see: if you filter to external links, you copy external links.

    Internal vs External Links

    An internal link points to the same site as the page it’s on. An external link points to somewhere else. To tell them apart, the tool needs to know where the page lives. Here’s how a few links are sorted for a page at https://www.example.com/blog/sourdough-starter:

    LinkType
    /menu internal
    https://example.com/contact internal
    https://shop.example.com/flour external
    https://en.wikipedia.org/wiki/Sourdough external
    #feeding anchor (same page)
    mailto:[email protected] mailto
    javascript:window.print() javascript (not a real link)

    www.example.com and example.com count as the same site. Other subdomains, like shop.example.com, count as external, because they’re often run as separate sites. Without a base URL, relative links like /menu still count as internal, and every full https:// address counts as external.

    Nofollow, Sponsored and UGC Links

    The rel attribute tells search engines and browsers a bit more about a link. The tool shows these values as small tags next to each link:

    <a href="https://shop.example.net/flour" rel="sponsored nofollow">organic rye flour</a>
    <a href="https://crumbdiaries.example.org/" rel="ugc nofollow">my starter blog</a>
    <a href="https://www.instagram.com/" target="_blank" rel="noopener">Instagram</a>
    • nofollow: “don’t treat this link as a recommendation.” Use it for links you don’t want to vouch for.
    • sponsored: the link is paid for: an ad, an affiliate link, a sponsored post.
    • ugc: user-generated content, like links in comments or forum posts.
    • noopener and noreferrer: about safety and privacy when the link opens in a new tab (target="_blank"), not about search engines. The tool shows those links with a “new tab” tag.

    How Relative URLs Are Resolved

    Most links inside a site are written short, like /menu or ../recipes. The browser fills in the rest from the page’s own address (or from <base href> if the page has one). With a base URL and “Resolve relative URLs” on, the tool does the same. For a page at https://www.example.com/blog/sourdough-starter:

    Written in the HTMLFull address
    /menu https://www.example.com/menu
    ../recipes/rye-bread https://www.example.com/recipes/rye-bread
    photo.jpg https://www.example.com/blog/photo.jpg
    ?page=2 https://www.example.com/blog/sourdough-starter?page=2
    //cdn.example.net/app.js https://cdn.example.net/app.js
    #feeding #feeding

    A path that starts with / starts from the root of the site. One without a slash, like photo.jpg, sits next to the current page, so it lands in /blog/. ../ goes up one folder. Links that jump to a spot on the page (#feeding) are kept short, since that’s easier to read.

    Finding Images and srcset

    One picture on a page can have several files: a WebP and a JPEG, a small one for phones and a big one for wide screens. The Images tab lists every one of them, with where it was found:

    <picture>
      <source type="image/webp" srcset="/img/crumb.webp 1x, /img/[email protected] 2x">
      <img src="/img/crumb.jpg" alt="Open crumb of a sourdough loaf"
           srcset="/img/crumb-400.jpg 400w, /img/crumb-800.jpg 800w">
    </picture>
    Image URLFound in
    /img/crumb.webp picture 1x
    /img/[email protected] picture 2x
    /img/crumb.jpg img
    /img/crumb-400.jpg srcset 400w
    /img/crumb-800.jpg srcset 800w

    It also finds lazy-loading attributes (data-src, data-srcset), CSS background-image: url(...) in style attributes and <style> blocks, favicons, video posters, and the og:image and twitter:image used for link previews. An <img> with no alt attribute at all gets a “No alt text” tag; alt="" is fine for decorative images, so it isn’t flagged.

    What It Can’t Do

    More Tools for Working with HTML

    Need the tables from the same page? The HTML Table to CSV & Excel tool pulls them out as spreadsheets, and HTML to Text gives you just the readable words. Checking a page’s SEO? The Meta Tag Generator writes the title, description and og:image tags for you, and the HTML Validator finds broken tags and other mistakes in the markup.

    Frequently Asked Questions

    How do I extract all links from a web page?

    Open the page in your browser and press Ctrl+U (Cmd+Option+U on a Mac) to see its source. Select all, copy, and paste it into the left panel. Every link shows up on the right with its text and type. Click Copy URLs to get them one per line, or CSV to download the whole list.

    Can I just type a URL instead of pasting the HTML?

    No, sorry. Browsers don’t let one website read another website’s pages, so this page can’t fetch a URL for you. Viewing the source and pasting it takes a few seconds, and it also means your HTML never leaves your browser.

    What’s the difference between internal and external links?

    An internal link points to the same site as the page it’s on, like /menu or https://www.example.com/blog on example.com. An external link points to another site, like https://en.wikipedia.org. To tell them apart the tool needs the page’s address, which it reads from the canonical link, og:url or <base href> when the HTML has one. You can also type it in the Base URL box. www.example.com and example.com count as the same site; other subdomains like shop.example.com count as external.

    What do nofollow, sponsored and ugc mean?

    They’re values of a link’s rel attribute that tell search engines how you feel about the link. rel="nofollow" means “don’t count this as a vote for that page”. rel="sponsored" marks paid links, ads and affiliate links. rel="ugc" marks links that visitors added, like links in comments or forum posts. A link can have more than one, like rel="sponsored nofollow". Pick Nofollow in the Show list to see only those links.

    Does it check for broken links?

    It doesn’t visit any of the links, so it can’t tell you if a page returns a 404. What it does flag are links that can’t work as written: an empty href, href="#" that goes nowhere, javascript: links that run a script instead of opening a page, and addresses that aren’t valid. Pick “Not real links” in the Show list to see them.

    Why are some links missing?

    The tool reads the HTML you paste. Links that JavaScript adds after the page loads (menus, infinite scroll, many single-page apps) aren’t in the page source. To catch those, open the page, right-click it and choose Inspect, then in the Elements panel right-click the <html> line and pick Copy, then Copy outerHTML. Paste that instead, since it’s the page as it looks right now.

    How do I get all image URLs from HTML?

    Open the Images tab. It lists the src of every <img>, every size in srcset and <picture> sources, lazy-loading attributes like data-src, CSS background images, favicons, video posters and the og:image used for social previews. Each one shows its alt text, and images with no alt attribute at all are flagged. Nothing is downloaded, so you only see the addresses, not the pictures.

    How do I extract email addresses from HTML?

    Open the Emails tab. It picks up every address in mailto: links (including cc and bcc) and addresses written in the page text, like [email protected]. Duplicates are merged, so each address appears once. Addresses hidden with tricks such as “name [at] example [dot] com” or built by JavaScript aren’t found.

    Is my HTML uploaded anywhere?

    No. Everything happens in your browser: the HTML is read, never run, and nothing in it is opened or downloaded. Links in the list only open when you click them, in a new tab.