URL Extractor
Pull all URLs out of any text. Choose to include or exclude http(s) protocol.
Getting every link out of a block of text
This tool scans text or HTML source and pulls out every URL it contains, removing duplicates and sorting the results. It saves a great deal of manual copying when auditing a page, checking a document's references, or cleaning up an export.
Key takeaways
- Matches http and https URLs, with query strings and fragments preserved.
- Results are deduplicated and sorted.
- Trailing punctuation is a common source of malformed matches.
- Extraction is not validation - a well-formed URL may still be dead.
- Everything runs locally in your browser.
What gets matched
The pattern looks for a scheme, followed by a host, followed by an optional path, query and fragment:
| Input | Extracted | Note |
|---|---|---|
| https://example.com | https://example.com | Standard |
| http://a.com/path?q=1#top | Full URL with query and fragment | Query strings preserved |
| <a href="https://x.com"> | https://x.com | Works on raw HTML |
| See https://example.com. | https://example.com | Trailing full stop trimmed |
| www.example.com | Not matched | No scheme |
| ftp://files.example.com | Not matched | Only http and https |
Anatomy of a URL
Understanding the parts helps when you need to filter or clean the results:
| Part | Example | What it is |
|---|---|---|
| Scheme | https | The protocol used |
| Subdomain | blog | An optional prefix on the host |
| Domain | example | The registered name |
| TLD | .com | The top-level domain |
| Port | :8080 | Optional; defaults to 80 or 443 |
| Path | /articles/2026/post | Location of the resource |
| Query string | ?utm_source=news&id=5 | Parameters after the question mark |
| Fragment | #section-2 | An in-page anchor, never sent to the server |
Common uses
- Auditing outbound links on a page before publishing.
- Collecting references from a research document.
- Extracting links from an email or chat export to check them.
- Building a list of URLs to submit to a crawler or link checker.
- Finding tracking parameters across a set of campaign links.
- Migration work, where you need every URL referenced in old content.
Cleaning tracking parameters
Extracted URLs frequently carry campaign parameters that are irrelevant to the destination. The common ones are worth recognizing:
| Parameter | Added by | Safe to strip? |
|---|---|---|
| utm_source, utm_medium, utm_campaign | Google Analytics tagging | Yes, for reference purposes |
| fbclid | Facebook click tracking | Yes |
| gclid | Google Ads click tracking | Yes |
| ref, referrer | Various referral schemes | Usually |
| ?id=, ?page= | Application parameters | No - often required |
Strip tracking parameters when storing URLs for reference, but be careful: some applications use query parameters that genuinely identify the page. Removing those breaks the link.
The UTM builder is the corresponding tool for constructing tagged links properly in the first place.
Extraction is not validation
- A well-formed URL can be completely dead. The pattern checks shape, not existence.
- Links rot steadily. A meaningful proportion of links in any document more than a few years old will have broken.
- Redirects hide the real destination. Shortened links in particular reveal nothing about where they lead.
- Never open an extracted URL blindly if the source text was untrusted - check the domain first.
Frequently Asked Questions
How does the URL extractor work?
It scans your text with a regular expression matching http and https URLs, capturing the scheme, host, path, query string and fragment. Matches are then deduplicated and sorted alphabetically.
Does it extract URLs from HTML?
Yes. It works on raw HTML source as well as plain text, so pasting a page's source will pull out the URLs from href and src attributes along with any written in the visible text.
Why do some extracted URLs have a stray full stop or bracket?
Punctuation immediately after a URL is ambiguous - a pattern cannot always tell whether a trailing dot belongs to the URL or ends the sentence. This tool removes trailing full stops, commas, colons, semicolons, quote marks and unmatched closing brackets, which is right for links written in prose. Other extractors may not, so check the last character of links from them.
Will it find URLs without http or https?
No. Bare hostnames such as www.example.com are not matched, because requiring a scheme avoids enormous numbers of false positives from ordinary text containing dots. Add the scheme first if you need those included.
Does it check whether the links work?
No. It extracts URLs based on their shape only. A perfectly well-formed URL can point to a page that no longer exists. Use a dedicated link checker to test whether they actually resolve.
Should I remove tracking parameters from extracted URLs?
Usually yes when storing links for reference - utm_source, fbclid and gclid add nothing to the destination. Be careful with parameters like ?id= or ?page=, which often identify the actual content and cannot be removed without breaking the link.
Is it safe to open extracted URLs?
Only if you trust the source. Check the domain before clicking anything extracted from untrusted text, and be especially wary of shortened links, which reveal nothing about their destination until you follow them.
Is my text uploaded anywhere?
No. Extraction runs entirely in your browser and nothing is transmitted or stored. Closing the tab discards everything.