TextToolboxTextToolbox
Home/Text Extraction / Analysis/Extract URLs from Text

Extract URLs from Text

Extract all hyperlinks and URLs from any text — paste a webpage, email, or document and get a clean list with domain breakdown, deduplication, and one-click copy.

Quick Answer

The Extract URLs from Text Tool finds all URLs in any block of text — including https, http, and bare www links — and returns a deduplicated list. Options include stripping query parameters, filtering HTTPS-only, sorting by domain, and exporting as a plain TXT file.

📝 Paste Your Text

🔗 Extracted URLs

Paste text to extract links.

What Is the Extract URLs from Text Tool?

The Extract URLs from Text tool automatically finds every hyperlink in a block of text — HTTP, HTTPS, and bare www. addresses included. Paste a webpage source, email thread, document, or any raw text and all URLs are listed instantly with domain breakdown, one-click copy, and a TXT export. Options include duplicate removal, query parameter stripping, HTTPS-only filtering, and alphabetical or domain-based sorting.

How to Use the URL Extractor

  1. Paste your text — URLs appear in the results panel as you type, no button needed.
  2. Enable options — Remove duplicates keeps one copy per URL; Strip URL params removes ?query=string portions; HTTPS only filters out insecure links.
  3. Sort results — A→Z, Z→A, or by domain for organised output.
  4. Copy All — copies every URL as a newline-separated list ready to paste anywhere.
  5. Export TXT — downloads a plain text file for sharing or archiving.

Where Can You Use the URL Extractor?

📈 SEO & Link Analysis
Paste HTML source or a scraped page to extract all outbound links, then sort by domain to audit link distribution and anchor strategy.
📰 Content Curation
Copy-paste a newsletter, article, or research document and get a clean list of all referenced URLs for bookmarking or sharing.
🛡️ Security Auditing
Extract all URLs from log files, email headers, or suspicious documents to review for phishing links or unexpected external calls.
📚 Research & Documentation
Pull all citations and reference links from a research paper or wiki page to compile a bibliography or check link validity.

URL Extraction Options and Features

  • HTTP & HTTPS detection — matches all absolute URLs beginning with http:// or https://, including paths, query strings, and fragments.
  • Bare www. detection — also catches www.example.com addresses written without a protocol prefix.
  • Deduplication — removes repeated URLs, keeping one copy per unique address.
  • Strip URL params — removes query strings (everything after ?) to normalise tracking URLs and UTM-tagged links to their base destination.
  • HTTPS only — filters out any http:// links, leaving only secure connections.
  • Sort modes — order results as found, A→Z, Z→A, or grouped by domain for quick pattern analysis.
  • Balanced parenthesis handling — trailing punctuation is stripped intelligently; closing parentheses are only removed when unbalanced, preserving Wikipedia-style URLs like /wiki/Parsing_(computer_science).

Best Practices and Limitations

The extractor matches HTTP/HTTPS and www. addresses only. ftp://, mailto:, and protocol-relative // URLs are not detected. For email addresses embedded in the same text, use the Extract Emails from Text tool instead.

Relative URLs like /contact or ../images/photo.jpg are not extracted — only absolute URLs with a recognised protocol or www prefix. If you paste raw HTML, absolute href and src values will be found correctly.

Very large inputs: The tool processes all text client-side with a single regex pass. Inputs up to 500,000 characters complete in under a second on modern devices. For multi-megabyte text files, processing may take 1–2 seconds.

Share This Tool

Help developers and researchers extract links from text for free!

Frequently Asked Questions

What types of URLs does the tool detect?+

The tool matches HTTP and HTTPS URLs (including those with paths, query strings, and fragments) and bare www. addresses without a protocol prefix. It does not detect FTP, mailto, or relative URLs like /page/path — only absolute web addresses with a recognised protocol or www prefix are extracted.

What does Strip URL Parameters do?+

Enabling "Strip URL params" removes the query string portion (everything after the ? in a URL). For example, https://example.com/page?utm_source=email&ref=123 becomes https://example.com/page. This is useful when you want to collect destination URLs without tracking parameters, or when deduplicating URLs that have the same base but different query strings.

Can I extract URLs from HTML source code?+

Yes — paste raw HTML and the tool will find all absolute URLs within the text, including those inside href="", src="", and plain text. Note that relative URLs like /contact or ../images/photo.jpg are not detected; only fully-formed URLs with a protocol or www prefix are extracted.

How do I sort URLs by domain?+

Select "Order: By Domain" from the Sort dropdown. The tool uses the browser's URL API to parse the hostname from each URL, strips the www. prefix, and sorts alphabetically by domain name. This groups all links to the same domain together, making it easy to see which sites are linked most frequently.

Is there a limit to how much text I can paste?+

There is no hard limit. The tool processes text entirely in your browser with a regex, so performance depends on your device. Texts up to 500,000 characters process in under a second on modern devices. For very large inputs (millions of characters), extraction may take 1-2 seconds.