A page can hold far more links than anyone remembers adding. Navigation, body copy, buttons, footers and template parts all contribute, and after a few rounds of edits nobody can say from memory which links point where, what text each one shows, or which ones carry a nofollow. Reading raw HTML line by line is slow and error prone, especially when the markup came from a CMS export or an email template.

The practical answer is to let a parser do the counting. This guide walks through the full workflow with the free Link and Anchor Text Extractor on Ovatly: get the HTML, paste it, read the table it returns, check the summary line, and take the results out as CSV for a spreadsheet.

Contents

  • Quick answer
  • What the extractor reads
  • What counts as a link
  • How to extract links, step by step
  • Reading the table and the summary line
  • Taking the results out as CSV
  • Worked example: a two-link snippet
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

To extract all links and anchor text from a page's HTML: copy the HTML from a page source, a saved page, an email template or a CMS export, and paste it into the Link and Anchor Text Extractor. Read the table, one row per link, with the href, the anchor text visitors see, the rel attributes and the target. Check the summary line for the total count and how many links are nofollow. Then copy the results as CSV, or download the CSV file for a spreadsheet.

What the extractor reads

The input is HTML you paste, not a live page the tool visits. That distinction matters. A page source gives you the markup behind a published page. A saved page gives you the same markup from a file on your device. An email template or a CMS export gives you markup that may not be published anywhere yet, which makes the extractor useful before a send or a launch, not only after one.

Because you supply the markup, the tool works on exactly the version you hand it. If the HTML in your editor differs from what is live, the table describes your version. Very large pages are not a problem: extraction stays quick because the browser's own HTML parser does the work of reading the markup and finding the anchors.

Only anchor tags with an href attribute count as links. A named anchor or a placeholder tag without an href is ignored, because there is no destination to list. This is the first scope rule a new user trips over: a clickable-looking element in the design may produce no row at all if the underlying tag carries no href.

Relative hrefs are shown exactly as written in the markup, not resolved against a domain. A link written as /about appears as /about, because pasted fragments have no base address to resolve against. The table is faithful to the source, which is what you want when the job is checking the markup itself.

The pasted code is parsed in a passive document. Scripts in the pasted HTML never run and images never load, so extraction is a reading exercise only.

  1. Copy the HTML from a page source or template and paste it in the box in the Link and Anchor Text Extractor. View-source output, a saved page or a fragment all work.
  2. Read the table: one row per link, with href, anchor text, rel and target. Scan the rows against what you expected the page to contain.
  3. Check the summary line for the total count and how many links are nofollow. A count that surprises you is a signal to look closer at the rows.
  4. Copy the results as CSV, or download the CSV file for a spreadsheet, so the list can be sorted, filtered and shared.

Reading the table and the summary line

Each row answers four questions about one link. The href is the destination exactly as written. The anchor text is the wording visitors see and click. The rel column shows attributes such as nofollow or sponsored when they are present. The target shows whether the link was set to open in a new tab, for example _blank, or carries no target at all.

The summary line sits above the detail and gives the shape of the whole page: the total number of links and how many of them are nofollow. The nofollow count includes combined values such as nofollow sponsored, so a sponsored link with both attributes still counts once in that total. On an audit, that number flags links that pass no ranking endorsement, which is right for ads and comments and worth questioning on editorial links.

Taking the results out as CSV

A table on screen is useful for a quick check, but most real work happens in a spreadsheet. The extractor lets you copy the results as CSV or download the CSV file. The CSV has columns href, text, rel, target and title, one link per row, with standard CSV quoting so commas inside anchor text do not break the columns.

Once the list is in a spreadsheet you can sort by anchor text to spot repeated labels, filter the rel column to review every nofollow link together, or share the file with an editor who needs to approve changes before a rewrite.

Paste a snippet containing an anchor with href https://example.com, rel nofollow sponsored and text Example Site, plus a second anchor with href /about, target _blank and text About. The extractor returns a table of 2 links.

The first row shows anchor text Example Site and rel nofollow sponsored, and it is counted as nofollow in the summary line. The second row points to /about with target _blank, and its href stays exactly as written rather than being expanded into a full address. If the same snippet also held an anchor tag without an href, it would produce no row at all, because it is not a link.

Limitations and honest tradeoffs

The extractor lists what is in the pasted HTML, and only that. A link built by script at runtime never appears in static markup, so it will be missing from the table even though visitors see it on the rendered page. An anchor without an href, such as a JavaScript placeholder, is likewise absent by design.

Relative hrefs stay unresolved, so the table cannot tell you the full address a relative link points to on a live site. The tool also reads one paste at a time: it does not crawl a site or follow links from page to page. What it gives you is a faithful inventory of the markup you supplied, which is the right scope for checking a template, an export or a single page source.

Common mistakes

  • Pasting the rendered page instead of the source. Copying what you see in the browser gives you visible text, not markup. Use view-source output, a saved page or the template file itself.
  • Expecting placeholder tags to appear. An anchor without an href is not a link and is not listed, even if it looks clickable in the design.
  • Reading a relative href as a full address. A row showing /about reflects the markup as written. Do not assume a domain was checked or attached.
  • Ignoring the summary line. The total and nofollow counts are the fastest sanity check you have. If they surprise you, the rows deserve a closer read.
  • Treating a missing link as a tool error. A link built by script at runtime never reaches the static HTML, so its absence from the table is accurate information about the markup.

FAQs

Can I paste a whole page's source? Yes. View-source output, a saved page, or a fragment all work. Very large pages extract quickly because the browser parser does the work.

Why is a link I expected missing from the results? The most common reasons are that the anchor has no href, so it is a JavaScript placeholder, or the link is built by script at runtime and never appears in the static HTML you pasted.

What does the nofollow count in the summary line mean? It counts how many links carry rel=nofollow, including combined values like nofollow sponsored. It flags links that pass no ranking endorsement, which is right for ads and comments and worth questioning on editorial links.

What columns does the CSV have? The CSV has columns href, text, rel, target and title, one link per row, with standard CSV quoting so commas inside anchor text do not break the columns.

Do scripts in the pasted HTML run during extraction? No. Parsing uses the browser's own HTML parser in a passive document, so scripts in the pasted code never run and images never load.

Conclusion

Extracting links is a four-part habit: get the HTML, paste it, read the table and the summary line, and keep the CSV. The Link and Anchor Text Extractor turns a page of markup into that inventory in one pass. Once you have the list, the natural next step is judging what the labels say, which our guide on auditing anchor text for over-optimization covers. For more guides in this series, see the URL and Link Tools guides.