ConvertCSV

Converter tool

HTML Links to CSV Converter

Extract HTML links and export to CSV

Preview

Output Preview

No output yet. Upload or paste input and convert.

HTML Links to CSV Converter

Web pages bury useful URLs inside anchor tags scattered across navigation, body copy, sidebars, and footers. Opening each link manually or scraping with a custom script is overkill when you only need a spreadsheet inventory. This free HTML links to CSV converter finds every <a href> in the markup you paste, then exports link text, href, and title into a clean CSV you can open in Excel, Google Sheets, or any downstream audit tool.

Paste a full page’s HTML or a smaller fragment — an article body, a resource list, or an email template. The parser walks the DOM, collects anchors that declare an href, trims visible text, preserves the raw URL (including relative paths), and records the title attribute when present. Conversion runs entirely in your browser; the pasted HTML is not uploaded to a server as part of the transform.

Below you will find how to copy the right markup (page source versus rendered DOM), how relative URLs behave, how to dedupe and filter navigation noise, SEO and migration use cases, privacy notes, and a full troubleshooting and FAQ section. Use the preview as your source of truth before you download or share the file.

Key features

  • Extracts every <a href> anchor from pasted markup, including navigation, footer, sidebar, and inline content links.
  • Captures visible link text, the raw href, and the optional title attribute as separate CSV columns.
  • Preserves relative URLs exactly as written instead of guessing a base domain to absolutize them.
  • Works on full pages or small HTML fragments — paste only the article body when that is all you need audited.
  • Keeps document order so the CSV roughly mirrors how links appear top-to-bottom in the source.
  • Runs entirely in the browser using the DOM parser so markup is not sent to a server for conversion.
  • Produces standard CSV ready for Excel, Google Sheets, SEO tools, or further converters on this site.

About the HTML links to CSV format

HTML anchors use <a href="..."> to point browsers at another resource. CSV is a plain-text grid with a header row and one row per record. Conversion means querying every qualifying anchor and projecting three fields — visible text, href value, and optional title — into columns named text, href, and title.

The parser loads your markup into a DOM tree and selects elements matching a[href]. For each match it reads trimmed textContent, the href attribute exactly as written in the source, and the title attribute when it exists (blank otherwise). Order follows document order, so the CSV reflects how links appear in the HTML you pasted.

Relative paths such as /pricing or ../docs/guide stay relative. Absolute https:// URLs, mailto:, tel:, and hash-only hrefs are kept as-is. The tool does not invent a base domain, resolve against <base href>, or rewrite protocol-relative //example.com links — what you see in the attribute is what lands in the CSV.

How it works

The converter loads the pasted string into a browser DOMParser as an HTML document, then queries for every a[href] element anywhere in that tree. Anchors without an href attribute are skipped because they are not navigable links in the usual sense.

For each matching element it builds one CSV row: trimmed visible text from textContent, the href attribute value unchanged (relative or absolute), and the title attribute when present. Missing titles become empty cells so the column layout stays consistent.

Rows are emitted in source order and escaped for spreadsheet use. You review the preview, then copy or download. No network crawl, login, or base-URL resolution happens — the tool only sees what you pasted.

Common use cases

  • Auditing outbound and internal links on a marketing page for an SEO or content review.
  • Building a link inventory from a saved HTML archive during a site migration.
  • Extracting resource and citation links from documentation for a checklist or knowledge base.
  • Cataloging reference URLs from an academic or report HTML export.
  • Pulling CTA and footer destinations from a campaign landing page before redesign.
  • Inventorying links inside an HTML email template without opening every href by hand.

How to use this tool

  1. Copy the page HTML — View Page Source for static markup, or the rendered node’s outerHTML from DevTools when links are built by JavaScript.
  2. Paste the markup into the converter and confirm the preview lists the expected text, href, and title columns.
  3. Scan for blank text rows, unexpected javascript: or mailto: entries, and obvious nav/footer noise.
  4. Copy or download the CSV, then filter, sort, or dedupe by href in your spreadsheet as needed.
  5. If you need absolute URLs, prepend the site origin with a formula and spot-check a handful of paths against the live site.

Example

Input HTML

<a href="/pricing" title="See plans">Pricing</a>
<a href="https://example.com/docs">Docs</a>

Output CSV

text,href,title
Pricing,/pricing,See plans
Docs,https://example.com/docs,

Tips for best results

  • Paste the full page HTML or just the section you care about — the parser finds all <a href> tags in either case.
  • For JavaScript-rendered pages, copy the rendered DOM from DevTools (Copy outerHTML), not View Page Source alone.
  • Filter navigation and footer rows in a spreadsheet if your audit is about in-content links only.
  • Deduplicate on the href column when you need a unique URL inventory rather than every occurrence.
  • Keep relative URLs as-is for migration planning; prepend the domain later with a spreadsheet formula if you need absolutes.
  • Spot-check empty text rows — icon-only or image links often have blank visible text but a valid href.
  • Combine with HTML Table to CSV when a page has both data tables and link lists worth extracting.

Common errors and how to fix them

Links that appear on the live page are missing from the CSV.
Those links are likely added by JavaScript after the initial page load and are not present in the raw HTML source. Use your browser’s DevTools Elements panel to copy the fully rendered DOM (Copy outerHTML) instead of View Page Source alone.
Relative URLs like /about show up without the domain attached.
This is intentional — the converter preserves hrefs exactly as written rather than guessing which domain they resolve against. If you need absolute URLs, prepend the site’s origin in a spreadsheet formula after export.
The same link appears multiple times in the output.
This is expected when the URL genuinely appears more than once (for example once in navigation and once in the footer). Use your spreadsheet’s remove-duplicates feature on the href column if you only want unique destinations.
The title column is empty for most links.
The title attribute is optional in HTML and most links never set one. An empty title cell for an anchor without that attribute is expected behavior, not an extraction error.
Some rows have a valid href but blank link text.
Icon-only buttons, image links without alt text surfaced as text, or anchors wrapping empty spans often yield empty textContent. Keep the href for the inventory and fill a label manually, or inspect the DOM for aria-label / img alt if you need a human-readable name.
The CSV is dominated by header and footer URLs I do not care about.
Paste a narrower HTML fragment (main content only) instead of the full document, or filter out known nav/footer paths in the spreadsheet after export. Isolating <main> or the article node before pasting usually produces a cleaner audit set.

Best practices

  • Prefer the rendered DOM from DevTools when the page is a SPA or otherwise hydrates links after load; use View Page Source only when anchors are present in the static HTML.
  • Deduplicate by href when you need a unique link inventory; keep duplicates when you are studying link density or repeated CTAs.
  • Filter out navigation and footer destinations early if the goal is in-content or outbound-only analysis.
  • Record the page URL and capture date in the filename or a metadata cell — link inventories go stale quickly.
  • Treat relative URLs as first-class data during migrations; resolve to absolute only when a tool requires full URLs.
  • Review blank-text and non-http(s) schemes before sharing an audit so stakeholders are not confused by icon links or mailto rows.
  • Pair with HTML Table to CSV and the Online CSV Editor when a page needs both tabular extracts and a separate link inventory.

What HTML links to CSV conversion actually does

Browsers treat anchors as interactive navigation. Spreadsheets and SEO workflows need a flat list of destinations with enough context to judge each one. This conversion reads every <a href> in the HTML you provide and writes one CSV row per anchor: the visible text people click, the href string the browser would follow, and the optional title tooltip attribute.

You keep structural link data, not styling, scripts, or click handlers. Images inside anchors contribute whatever text the DOM exposes (often little or nothing). Nested markup is flattened to textContent, so a link wrapping a <span> still yields readable label text when that text exists in the tree.

It is not a full web scraper: it does not fetch URLs, follow redirects, log in, or wait for network calls. You paste markup that already contains the anchors you need. That makes it ideal for one-off inventories and terrible as a substitute for a scheduled crawler.

When to extract HTML links to CSV

Extract when a page shows many links but offers no export, when you are migrating content and need a checklist of destinations, or when an SEO review asks for outbound and internal URL inventories from specific templates.

Skip this tool if the site already provides a sitemap, link report, or CMS export that is authoritative. Skip if you need status codes, redirect chains, or broken-link detection — those require fetching each URL, which this converter never does.

A practical pattern: copy the relevant HTML, convert to CSV, filter noise, dedupe, then feed the href list into a crawler, spreadsheet review, or migration ticket backlog.

  • Good fit: landing-page audits, docs resource lists, HTML email templates, archived page inventories, migration checklists.
  • Poor fit: infinite-scroll feeds without static anchors in the paste, canvas-drawn UIs, PDF screenshots of link lists.
  • Better as a script: recurring crawls across thousands of URLs, authenticated areas, and change detection over time.

Page source versus Inspect Element versus rendered DOM

View Page Source shows the HTML as delivered by the server. Classic CMS and static sites often include every important <a href> there, so a source paste works cleanly and matches what search engines see in the initial response.

Modern apps inject navigation and content links with JavaScript after load. Source may lack those anchors even though you clearly see them. In DevTools Elements, locate a high-enough ancestor (often <body>, <main>, or the page shell), use Copy → Copy outerHTML, and paste that rendered snapshot here.

Inspect Element is excellent for finding a node, but copying a tiny leaf can miss sibling links, while copying the entire document can include chrome you do not want. Prefer the smallest ancestor that still contains every link in scope for your audit.

Relative versus absolute URLs

Relative hrefs such as /pricing, ./guide, or ../parent/page are intentional authoring choices. The converter leaves them untouched so migration and template work can see the site’s real path structure instead of a guessed absolute form.

Absolute URLs (https://example.com/docs) appear unchanged. Protocol-relative links starting with // are also preserved literally. If your spreadsheet or crawler requires fully qualified http(s) URLs, concatenate the origin yourself and normalize schemes in a second step.

Hash-only hrefs (#section) and query-heavy paths are kept as written. That is useful for in-page navigation audits and UTM reviews, but it also means you should filter fragments when you only care about distinct documents.

Deduping, occurrence counts, and unique inventories

A marketing page often repeats the same CTA in the hero, a mid-page button, and the footer. Each occurrence becomes its own CSV row because each is a real anchor in the DOM. That is the correct default for studying link placement and density.

When stakeholders want a unique destination list, sort or pivot on href and remove duplicates in Sheets or Excel. You can also count occurrences first to see which URLs are promoted most aggressively before collapsing to uniqueness.

Deduping on text alone is riskier: different URLs can share the label “Learn more.” Prefer href as the uniqueness key unless you are specifically studying ambiguous anchor text for SEO.

SEO audits and content inventories

SEO reviewers use link extracts to spot thin anchor text, over-optimized exact-match phrases, accidental nofollow patterns (when those attributes are inspected separately), and unexpected outbound domains on money pages. A CSV makes sorting by host and filtering by path prefix straightforward.

Content inventories benefit from pairing text and href: editors see which labels point where without clicking through the live site. During redesigns, the inventory becomes a regression checklist — every important destination should still exist after the new template ships.

Remember that this export does not evaluate crawlability, robots rules, or HTTP status. Pair the CSV with a crawler or Search Console data when the question is “what is indexed and healthy,” not merely “what is linked from this HTML.”

Navigation, footer, and chrome filtering

Global navigation and footer blocks dominate raw extracts. If your question is about editorial or product links inside the article, paste <main> / article HTML only, or filter known chrome paths (/login, /privacy, social icons) after export.

Mega-menus can contribute dozens of links that are valid but irrelevant to a single-page content audit. Separating “template links” from “page-specific links” early keeps reviews short and decisions clear.

When you do care about chrome — for example verifying footer legal URLs after a rebrand — paste the footer fragment alone so the CSV is a focused checklist instead of a mixed bag.

Browser limits, privacy, and sensitive pages

Parsing is local. Pasted HTML is not sent to Convert CSV servers for the transform. Site analytics and advertising follow the privacy policy separately from the conversion itself.

Huge pages with enormous menus and footer link farms can slow the tab. Paste a fragment when possible. Extremely large pastes are a browser memory concern, not a server quota.

Internal wikis, HR portals, and staging sites may embed sensitive destinations or tokens in query strings. Even with local conversion, treat the resulting CSV as sensitive: scrub tokens, avoid shared machines, and do not paste secrets into chat or tickets casually.

HTML links to CSV versus scraping scripts

Scripts (Beautiful Soup, Playwright, Screaming Frog-style crawlers, and custom Node tools) win when you need multi-page crawls, login, waiting for network idle, status codes, and scheduled diffs. They also resolve base URLs and can apply allow/deny lists at fetch time.

This converter wins for one-off extracts: open a page, copy markup, download CSV in seconds without writing selectors or standing up a browser automation job. It is also useful when you already have HTML on disk from an archive and just need a spreadsheet.

If you convert the same URL every week, that is the signal to automate with a small scraper and keep this tool for ad hoc pages, emails, and one-time migration dumps.

Quality checklist before you share the CSV

Confirm the row count roughly matches what you expect for the scope you pasted. Spot-check a few hrefs against the live page. Glance at blank text rows and non-http(s) schemes so reviewers are not surprised.

Open the file in the recipient’s spreadsheet app. Verify encoding for non-ASCII anchor text. Note the source URL and capture date when the inventory informs a decision or ticket.

  • Correct HTML scope selected (content vs full chrome).
  • JS-rendered links included via DevTools copy when needed.
  • Duplicates handled intentionally (kept or removed).
  • Relative vs absolute policy decided for the audience.
  • Source URL and date recorded when the extract matters over time.

Email HTML and CMS quirks

HTML emails wrap links in tracking redirects, nested tables, and VML for Outlook. Pasting the message’s HTML still extracts hrefs, but many will point at ESP click-tracking domains rather than the final marketing URL. Decide whether tracking URLs or final destinations are the audit target before you share results.

CMS “link lists” sometimes render as buttons or cards whose clickable area is a wrapping <a>, with visible text buried in child nodes. textContent usually still captures the label; when it does not, inspect for aria-label or adjacent headings.

Copying from a rendered email preview in a browser is often easier than from a desktop client’s source view. Prefer the DOM that actually contains the anchors you see.

Anchor text quality, images, and accessibility labels

Good inventories surface weak anchor text: “click here,” bare URLs as labels, or empty text on icon buttons. Those rows are signals for content and accessibility fixes, not converter bugs.

Image links may expose alt text through the accessibility tree in the browser UI while textContent remains empty or sparse. If labels matter, enrich blank-text rows manually from alt or aria-label during cleanup.

Title attributes are rarely a substitute for visible text. Many accessibility guidelines discourage relying on title tooltips. Treat the title column as optional metadata, not the primary label for audits.

Schemes, tracking parameters, and post-processing

Besides http(s), expect mailto:, tel:, sms:, and occasionally javascript: or custom app schemes. Filter by prefix when your workflow is “web pages only.” Keep mailto/tel rows when you are inventorying contact affordances on a support page.

UTM and click-id query parameters explode uniqueness if you dedupe naively on the full href. For destination inventories, strip query strings or normalize on path+host before counting unique pages.

A short spreadsheet pass — split host, path, and query; flag external domains; flag empty text — turns a raw extract into a review-ready sheet without writing a scraper.

Related tools and next steps

Need tabular data from the same page? Use HTML Table to CSV. Need a downloadable spreadsheet workbook instead of CSV text after cleanup? Continue through the CSV to Excel path once headers and rows look right.

Clean blank rows, rename columns, and dedupe in the Online CSV Editor, then continue to JSON or Markdown if another system needs a different feed. Site guides cover delimiter and Excel import issues when the open step misbehaves.

For broken-link or status-code work, export hrefs here first, then feed the unique URL list into a crawler or monitoring tool. This converter’s job ends when the inventory CSV is accurate.

Frequently asked questions

Do I need to paste the whole page, or can I paste a fragment?

Either works. The converter finds every <a href> inside whatever markup you paste. Pasting a smaller fragment (for example only <main>) is usually better when you want to exclude navigation and footer chrome.

What columns does the output CSV have?

Three columns: text (visible link label), href (the URL attribute exactly as written), and title (the optional title attribute, empty when absent).

Does this find links inside JavaScript-rendered content?

Only if those links exist in the HTML you paste. For client-rendered anchors, copy the rendered DOM from DevTools (Copy outerHTML) after the page has finished loading, rather than relying on View Page Source alone.

Are relative URLs converted to absolute ones?

No. Hrefs are preserved exactly as written. If you need absolute URLs, prepend the site’s origin in a spreadsheet formula or post-process the href column afterward.

Is the pasted HTML sent to a server?

No. All parsing happens in your browser’s own DOM engine. See the Privacy Policy for site analytics and advertising.

Why do I see duplicate URLs in the CSV?

Each anchor in the markup becomes its own row, so repeated CTAs and shared footer links appear multiple times. Remove duplicates on the href column when you want a unique inventory.

Why is the title column empty?

Most links never set a title attribute. Empty title cells are normal. The converter still always emits the title column so the schema stays consistent.

Can I extract links from an HTML email?

Yes — paste the email’s HTML. Be aware that many hrefs may be click-tracking redirects from your ESP rather than final destination URLs.

What about links without an href attribute?

Anchors used only as placeholders or script targets without href are skipped. The selector targets a[href] so only navigable href-bearing anchors are exported.

Will button elements or div click handlers appear?

No. Only HTML anchor elements with href are extracted. Clickable divs and <button> elements are outside the scope of this converter.

Is there a file size or link-count limit?

There is no fixed server quota, but very large HTML documents can slow the browser. Paste a focused fragment when the full page is huge.

How do I turn the CSV into JSON or clean it further?

Use the Online CSV Editor to filter and dedupe, then CSV to JSON (or other CSV output tools on this site) once the inventory looks right.

For more background on data formats and conversion workflows, read our format guides or browse the converter blog for step-by-step walkthroughs linked to each tool.