ToolNimba

πŸ”— URL Extractor: Extract Links From Text Online

Shihab Mia By Shihab Mia Β· Updated 2026-07-13

Separate by:
0
Unique results
0
Total found
0
Duplicates removed

Paste some text and press Extract URLs.

A URL extractor pulls every web link out of a block of text in one pass. Paste an article, email, log file, chat export or HTML source into the box and this free tool finds every address inside it: full http:// and https:// links plus bare www. addresses. It removes duplicate links case-insensitively, shows you the count found and the number of duplicates stripped, and lists each result on its own line ready to copy. Turn on "Domains only" to collapse the list down to unique hostnames, ideal for building an allowlist, blocklist or outreach list. Everything runs in your browser, so nothing you paste is uploaded.

What is the URL Extractor?

A URL (Uniform Resource Locator) is the address of a resource on the web. Most links you meet start with a scheme such as https://, but in plain text people also write bare addresses such as www.example.com or example.com/page. Pulling these out by hand is slow and error prone, especially in long documents where the same link appears many times or is buried inside HTML tags, markdown or log timestamps. A URL extractor automates the job: it scans the text with a pattern that recognises the shape of a web address, collects every match and hands you a tidy, deduplicated list.

This tool uses a pragmatic pattern that matches http:// and https:// links as well as addresses that begin with www. Each match runs from the scheme up to the first whitespace or bracketing character, and then trailing sentence punctuation (a full stop, comma, semicolon, colon, exclamation mark or question mark) is trimmed so a link written at the end of a sentence does not keep the stray period. This mirrors the common regex approach documented by developer references such as the Mozilla MDN URL guide, which defines the scheme, host, path, query and fragment parts that make up any address.

Results are deduplicated case-insensitively, so a link that appears three times shows once, and the count of duplicates removed is displayed so you can see how much noise was stripped. Case-insensitive matching matters because HTTP hostnames are not case sensitive: HTTPS://Example.com and https://example.com point to the same server, so treating them as one entry is the correct behaviour. The order of first appearance is preserved unless you choose to sort the list.

The "Domains only" option reduces each URL to its host: it drops the scheme, keeps everything up to the first slash, question mark or hash, then lowercases it. So https://blog.example.com/post?id=9 and https://blog.example.com/about both become blog.example.com and collapse into one entry. A leading www. is treated as part of the host and kept, so www.blog.example.com stays intact. This is the fastest way to turn a messy research dump into a clean list of unique sites for a link audit or outreach campaign.

Because every step runs in your browser with plain JavaScript, nothing you paste is uploaded, logged or stored. That privacy matters when the source text contains internal links, private notes, customer emails or server logs. Unlike a scraper that visits pages, this extractor never fetches anything: it only reads the text you give it and never opens the links, so it is safe to run on untrusted or sensitive content.

When to use it

  • Pulling every outbound link out of an article, newsletter or email for a quick link audit.
  • Building a list of unique domains from a research dump, SERP export or pile of search results.
  • Extracting URLs from a server log file, chat export or raw HTML source to inspect or test them.
  • Collecting backlink or outreach targets, then using Domains only to dedupe to one row per site.
  • Cleaning up a messy paste of links into a single deduplicated, sortable, copy-ready list.
  • Migrating content: gathering all links from an old page so you can check and update them.

How to use the URL Extractor

  1. Paste or type the text containing links into the input box.
  2. Choose how to separate results: one per line (newline) or comma separated.
  3. Tick "Domains only" to reduce every link to its hostname, or leave it off for full URLs.
  4. Optionally tick "Sort A to Z" to alphabetise the list.
  5. Press Extract URLs, then use Copy results to grab the deduplicated list.

Formula & method

The extractor matches text of the form (https:// or http:// or www.) followed by non-whitespace characters up to the first space or bracket, then trims trailing sentence punctuation. Domains only keeps the host: drop the scheme, then take everything up to the first / or ? or # and lowercase it. Unique count = total matches minus duplicates removed (compared case-insensitively).
Anatomy of a URLWhat the extractor reads, and what Domains only keepshttps://blog.example.com/post?id=9SchemeHost (domain)PathQueryDomains only mode keeps just the green hostblog.example.comScheme, path, query and fragment are removed, then lowercased

Worked examples

You paste: "Read more at https://example.com/guide and also https://example.com/guide, plus www.test.org."

  1. The pattern finds three matches: https://example.com/guide, https://example.com/guide, www.test.org
  2. Trailing punctuation is trimmed, so the final www.test.org loses its period
  3. Total found = 3
  4. Deduplicating case-insensitively leaves https://example.com/guide and www.test.org
  5. Unique = 2, duplicates removed = 1

Result: 2 unique URLs: https://example.com/guide and www.test.org, 1 duplicate removed.

Same text, but with "Domains only" turned on to collapse links to hostnames.

  1. Each match is reduced to its host: example.com, example.com, www.test.org
  2. The scheme and the /guide path are dropped, but the www. prefix is kept as part of the host
  3. Total found = 3
  4. Deduplicating the hosts leaves example.com and www.test.org
  5. Unique = 2 domains, duplicates removed = 1

Result: 2 unique domains: example.com and www.test.org, 1 duplicate removed.

You paste raw HTML: an anchor tag <a href="https://shop.example.com/cart?id=42#top">Buy</a> followed by a plain link https://shop.example.com/cart.

  1. The pattern matches the address inside the href and the plain link: https://shop.example.com/cart?id=42#top and https://shop.example.com/cart
  2. In full URL mode these are two different strings (one has a query and fragment), so both are kept: 2 unique URLs
  3. Turn on Domains only and both reduce to shop.example.com
  4. Deduplicating the hosts leaves a single entry

Result: Full mode: 2 unique URLs. Domains only: 1 unique domain, shop.example.com.

What the extractor matches and how it handles each case

Input in the textMatched?Result (full URL mode)Result (domains only)
https://example.com/pageYeshttps://example.com/pageexample.com
http://sub.example.orgYeshttp://sub.example.orgsub.example.org
www.example.com/path?q=1Yeswww.example.com/path?q=1www.example.com
Visit example.com.Nono scheme or wwwnot matched
ftp://files.example.comNoonly http, https, wwwnot matched
mailto:[email protected]Noemail scheme ignorednot matched

Anatomy of a URL: the parts the tool reads

PartExampleUsed for domains only?
Schemehttps://Removed
Host (domain)blog.example.comKept
Path/postRemoved
Query?id=9Removed
Fragment#sectionRemoved

Common URL schemes and whether this tool extracts them

SchemeExampleExtracted here?Notes
httpshttps://example.comYesStandard secure web link
httphttp://example.comYesStandard web link
www (no scheme)www.example.comYesTreated as a web link
ftpftp://files.example.comNoFile transfer, not a browseable web page
mailtomailto:[email protected]NoEmail address, not a URL
teltel:+15551234NoPhone link, not a URL
bare domainexample.comNoToo ambiguous; add https:// or www.

Common mistakes to avoid

  • Expecting bare domains with no scheme to be caught. A link written as example.com with no https:// and no www. prefix is not matched, because almost any word with a dot (file.txt, e.g., etc.) would otherwise be picked up as a false positive. Add https:// or www. if you need such links found.
  • Assuming every scheme is supported. This tool targets browseable web links: http, https and www. addresses. Other schemes such as ftp://, mailto: or tel: are intentionally ignored so the list stays focused on pages you can open in a browser.
  • Forgetting that trailing punctuation is trimmed. A link that ends a sentence, like see https://example.com., has its final period removed so the URL is clean. This is usually what you want, but a genuine URL that truly ends in punctuation is rare and would also be trimmed.
  • Treating Domains only as a path keeper. Domains only deliberately strips the path, query and fragment. If you need the full address with its page path, leave the option unticked and use full URL mode.
  • Confusing a subdomain with a duplicate. blog.example.com and shop.example.com are different hosts, so Domains only keeps both. If you want to group them under example.com, you would need to strip subdomains manually; this tool keeps the full host to stay accurate.
  • Pasting a screenshot or PDF and expecting links. The tool reads text you paste, not images or binary files. Copy the actual text (or the selectable text from a PDF) into the box; a link inside a picture cannot be extracted because there is no text to scan.

Glossary

URL
Uniform Resource Locator, the full web address of a page or resource, such as https://example.com/page.
Scheme
The prefix that says how to reach the resource, for example https:// or http://.
Domain (host)
The site name part of a URL, such as example.com or blog.example.com, without the path.
Subdomain
A label in front of the main domain, like blog in blog.example.com, that points to a separate section or service.
Path
The part after the host that points to a specific page, like /guide or /post.
Query string
The part of a URL after a ? that passes parameters, such as ?id=9, dropped in domains only mode.
Fragment
The part after a # that points to a section within a page, such as #section, dropped in domains only mode.
Deduplicate
To remove repeated entries so each unique link or domain appears only once in the list.

Frequently asked questions

What kinds of URLs does this tool extract?

It extracts full http:// and https:// links plus bare addresses that start with www. These cover the vast majority of browseable web links in normal text. Bare domains with no scheme and no www, and non-web schemes like ftp://, mailto: or tel:, are not matched by design.

How do I extract all links from a block of text?

Paste the text into the box and press Extract URLs. The tool scans the whole block, pulls out every http, https and www address, removes duplicates and lists each on its own line ready to copy. It works the same on articles, emails, chat exports, logs and raw HTML.

Does it remove duplicate links?

Yes. After extraction the tool deduplicates the list case-insensitively, keeps the first form it sees, and shows how many duplicates were removed. With Domains only on, it dedupes by hostname so the same site listed many times collapses to one row.

What does the Domains only option do?

It reduces each URL to its host. The scheme is dropped and everything from the first slash, question mark or hash onward is removed, then the host is lowercased. So https://blog.example.com/post?id=9 becomes blog.example.com. It is ideal for building a clean, deduplicated list of sites.

Can it extract links from HTML source code?

Yes. Paste raw HTML and the tool finds the addresses inside href and src attributes as well as any plain links in the text, because it matches the shape of the URL rather than the tag around it. It does not follow or fetch those links; it only reads what is in the text.

Is my pasted text uploaded anywhere?

No. The extraction runs entirely in your browser using plain JavaScript. Nothing you paste is sent to a server, logged or stored, so it is safe to use with private notes, customer emails, server logs or internal links.

Why was a link at the end of a sentence missing its period?

The tool trims trailing sentence punctuation (period, comma, semicolon, colon, exclamation or question mark) so a link written at the end of a sentence comes out clean and clickable, rather than ending in a stray punctuation mark.

Can I get the results as a comma separated list?

Yes. Choose the Comma option under Separate by and the results are joined with commas instead of one per line. You can also tick Sort A to Z to alphabetise, then press Copy results to put the list on your clipboard.

Does it extract bare domains like example.com without http or www?

No, and this is intentional. Matching every dotted word would flag false positives like file.txt, e.g. or version 3.14. To have such links found, add https:// or a www. prefix in the source text first.

How is a URL extractor different from a web scraper?

A scraper visits live web pages and downloads their content. This URL extractor never fetches anything; it only reads the text you paste and lists the addresses it finds. That makes it faster, private and safe to run on untrusted or sensitive text.

Sources