Domain Extractor
Paste any text — URLs, email addresses, log files, or plain prose — and pull out every domain name instantly. Include subdomains, strip www, deduplicate, sort, filter by TLD, and download the clean list. Everything runs in your browser, so your text never leaves your device.
Input Text
Paste any text with URLs, emails, or domainsExtracted Domains
ResultsYour extracted domains will appear here
Paste some text and click Extract Domains.
What does this Domain Extractor do?
This free online domain extractor scans any block of text and pulls out every domain name it finds. Paste a list of URLs, a batch of email addresses, a log file, or even plain prose that mentions websites — the tool parses it all and returns a clean, deduplicated list of domains.
Unlike simple regex-based extractors that get confused by paths, query strings, and subdomains, this tool normalises everything. It strips the https:// protocol, removes the www. prefix (optionally), and separates the domain from any path or query string. It also detects email addresses and extracts just the domain part after the @ symbol.
Everything runs locally in your browser using JavaScript. Your text never leaves your device — there is no server processing, no logging, and no data storage. Close the tab and it's gone.
How to extract domain names from text
- Paste your text: Drop URLs, email addresses, or any text containing domains into the input box. You can paste multiple lines at once.
- Choose your options: Enable Include subdomains to keep
blog.example.comas-is, or turn it off to strip down toexample.com. Toggle Strip www prefix to drop the leadingwww.. Enable Extract from emails to pull domains fromuser@example.com. - Click Extract Domains: The tool scans your text, normalises every match, and displays the results in the output panel.
- Filter and refine: Use the TLD filter chips to show only
.com,.org,.io, or any other extension. Toggle Sort to arrange the list alphabetically. - Copy or download: Use the Copy List button to grab all domains, or download as a
.txtfile with one domain per line.
Tip: The tool automatically deduplicates results by default. If you want to see every occurrence (including repeats), just toggle off Remove duplicates.
Why use this Domain Extractor?
Instant extraction
Results appear the moment you click Extract. No server round-trip, no waiting, no queue.
Smart normalisation
Strips protocols, paths, query strings, and ports. Handles subdomains, email addresses, and plain domains in the same pass.
Deduplicate & sort
Get a clean unique list with one click. Sort alphabetically, filter by TLD, and export in seconds.
100% private
Everything runs in your browser. The text you paste never leaves your device — no server, no logs, no tracking.
Copy or download
Copy the full domain list to your clipboard, or download it as a .txt file with one domain per line.
Works on mobile
Fully responsive design. Extract domains from a phone, tablet, or desktop — no app install required.
Domain vs URL vs Hostname vs Subdomain — what's the difference?
These four terms are often used interchangeably, but they mean different things. Understanding the difference helps you pick the right option when extracting domains.
| Term | Example | What it means |
|---|---|---|
| URL | https://blog.example.com/posts?page=2 | The complete web address. Includes protocol, subdomain, domain, TLD, path, and query string. |
| Hostname | blog.example.com | The full machine name. May include a subdomain prefix and always includes the registrable domain. |
| Domain (registrable) | example.com | The name you actually register with a registrar. Includes the second-level label plus the TLD. |
| Subdomain | blog in blog.example.com | An optional prefix that points to a specific service or area of a site. |
| TLD | .com, .org, .co.uk | The rightmost part of a domain. Can be single-label (.com) or multi-part (.co.uk). |
When you toggle Include subdomains off, this tool converts a hostname like blog.example.com into the registrable domain example.com. That's exactly what you want when you're grouping links by the site they point to, rather than by the specific subdomain.
Understanding TLDs: single-label, multi-part, and new gTLDs
Every domain ends in a top-level domain (TLD). Modern TLDs fall into three buckets, and this tool handles all three:
- Country-code TLDs (ccTLDs): Two-letter codes like
.uk,.de,.in,.jp. Some countries use a two-part structure where the registrable domain isexample.co.ukrather thanco.uk. - Generic TLDs (gTLDs): Legacy extensions like
.com,.org,.net,.info, plus new ones like.app,.dev,.io,.ai,.xyz. - Multi-part public suffixes: Combinations like
.co.uk,.com.au,.co.in,.com.br,.co.jp. These are treated as a single suffix when finding the registrable domain.
Because the tool keeps a curated list of both single-label and multi-part suffixes, it correctly identifies shop.example.co.uk as a subdomain of example.co.uk — not of co.uk. That distinction matters when you're building blocklists, allowlists, or backlink reports.
When would you need to extract domains?
SEO and link analysis
- Extract all external domains linked from a webpage or HTML source
- Build a list of referring domains from backlink reports
- Audit competitor outbound links to understand their link-building strategy
- Identify which third-party services, CDNs, and analytics providers a site uses
- Find broken outbound links by comparing live domains against a crawl log
Cybersecurity and threat intelligence
- Scan log files and incident reports for suspicious or unexpected domains
- Extract domains from phishing email HTML for investigation
- Build allowlists and blocklists from network traffic logs
- Map attack surface by finding all subdomains mentioned in a system
- Compare IOC feeds and deduplicate overlapping domain entries
Email list management
- Extract unique domains from a list of email addresses to segment contacts
- Identify business vs. personal email domains for marketing campaigns
- Clean up messy contact lists by pulling out the domain column
- Find common email providers in a customer database
- Detect disposable email domains before running a campaign
Data cleaning and research
- Extract domains from research papers, articles, or scraped web content
- Clean up URL fields in a spreadsheet by pulling out just the domain
- Build a source list from citations and references
- Normalise inconsistent URL formats in a dataset
- Prepare domain lists for DNS lookups, WHOIS queries, or bulk uptime checks
How domain extraction works under the hood
Domain extraction is more nuanced than running a single regex over text. Here's what the tool actually does:
- Email detection: When Extract from emails is enabled, the tool scans for email addresses like
user@domain.com, extracts the domain part, and marks the matched region as consumed so it won't be double-counted. - Full URL detection: It matches complete URLs including the protocol, hostname, port, path, query string, and fragment. The hostname is captured and the entire URL is consumed — so a domain-looking string inside a path like
https://example.com/blog/foo.comwon't be mistakenly extracted. - Bare domain detection: Finally, it scans for plain domains like
example.comorsub.domain.co.ukthat appear without a protocol. Any match that overlaps an email or URL — or is immediately preceded by@— is skipped. - Normalisation: Each match is cleaned — the protocol is stripped, the path and query string are removed, and the port number is discarded. If Strip www prefix is enabled, the leading
www.is removed. - Subdomain handling: If Include subdomains is disabled, the tool strips subdomains and keeps only the registrable domain (e.g.,
blog.example.com→example.com). - Strict TLD validation: Each candidate is checked against a curated list of single-label and multi-part TLDs. This filters out false positives like
file.txt,example.local, version strings, and IP addresses. - Deduplication and sorting: If enabled, duplicates are removed and the list is sorted alphabetically before display.
The tool handles common TLDs including multi-part extensions like .co.uk, .com.au, and .co.in. It also filters out IP addresses, which are not domains.
| Input | Extracted domain | Notes |
|---|---|---|
https://www.example.com/path?q=1 | example.com | Protocol, www, path, and query stripped |
https://example.com/blog/foo.com | example.com | Domain-like text inside the path is ignored |
user@mail.example.org | mail.example.org | Email domain extracted (with subdomains) |
blog.example.co.uk | blog.example.co.uk | Multi-part TLD handled correctly |
192.168.1.1 | — | IP addresses are ignored |
file.txt | — | Unknown TLD filtered out |
version 1.2.3.4 | — | Numeric-looking version strings ignored |
Best practices for domain extraction
- Paste the raw text. Don't worry about formatting — the tool handles line breaks, commas, tabs, and spaces as separators.
- Toggle subdomains based on your goal. If you're building a blocklist, keep subdomains. If you're doing domain-level analysis, strip them.
- Use Strip www prefix to normalise results when you don't care about the www variant. This is especially useful when comparing two lists for overlap.
- Disable email extraction if you're only interested in URLs. This prevents email domains from polluting your list.
- Use the TLD filter chips to focus on specific extensions. For example, click
.ioto see only startup domains, or.govto isolate public-sector sites. - Sort alphabetically before exporting to make the list easier to scan and deduplicate manually.
- Check the total count. If the "Total Found" number is much higher than "Unique", your input has a lot of repeated domains — dedupe is working.
- Cross-check before acting. Regex-based extraction is very accurate, but always eyeball the results before feeding them into an automation pipeline.
Privacy, accuracy, and limits
Privacy: Nothing you paste into this domain extractor is sent to a server. The extraction engine is a JavaScript function that runs entirely in your browser tab. There is no upload, no queue, no analytics event that includes your text, and no server-side log.
Accuracy: The extractor uses a curated list of single-label and multi-part TLDs to filter out false positives like filenames (style.css) and version strings (1.2.3). It also skips IP addresses, which are valid hosts but not domains. That said, no regex-based extractor is perfect — if you find an edge case, the results are still editable, so you can clean them up before copying or downloading.
Limits: There is no hard limit on input size. Because everything happens in-browser, the practical limit is your device's memory. Lists of tens of thousands of URLs process in under a second on a modern browser. Very large pastes (1 MB+) may take a moment.
Glossary of domain terms
- Domain
- The human-readable name of a website, made of a second-level label plus a TLD, like
example.com. - Subdomain
- A prefix added to a domain to create a separate section of a site, like
bloginblog.example.com. - Hostname
- The full name of a machine on the internet. May include a subdomain and always includes a domain. Example:
api.example.com. - TLD
- Top-Level Domain — the rightmost label of a domain, such as
.com,.org, or.uk. - ccTLD
- Country-code TLD — a two-letter code reserved for a country, such as
.defor Germany. - gTLD
- Generic TLD — extensions not tied to a country, like
.com,.org,.app, and.dev. - Public suffix
- A suffix under which users can register names. Examples:
com,co.uk,github.io. - Registrable domain
- The part of a hostname that you actually register — the public suffix plus one label. For
blog.example.co.uk, the registrable domain isexample.co.uk. - URL
- The full web address including protocol, hostname, path, and query string. Example:
https://example.com/path?q=1. - Protocol
- The scheme at the start of a URL, like
https://orftp://.
Frequently asked questions
user@example.com and extracts just the example.com part. You can toggle email domain extraction on or off depending on whether you want emails processed.blog.example.com and mail.example.com as separate entries. When disabled, it strips subdomains and returns only the root domain (example.com).www. from each domain. So www.example.com becomes example.com, and www.blog.example.com becomes blog.example.com..txt file with one domain per line.example.com). A URL includes the protocol, domain, path, and query string (https://example.com/blog?page=2). This tool converts URLs into just their domains..co.uk, .com.au, .co.in, .com.br, and .co.jp, so it correctly identifies the registrable domain.192.168.1.1 are not domain names, and the tool automatically filters them out of the results.href, src, and plain text.