Normalize Domains to Registrable Domain
Turning URLs or hostnames into the registrable domain (root domain) gives you a single canonical form per site. Examples:
Input:
api.mail.example.co.uk\nuser@sub.domain.com
Output (normalized to registrable domain):
example.co.uk\ndomain.com
How domain extraction works
Domain extraction in code: find URL-like strings and emails, then parse the hostname. Examples in JavaScript, Python, and regex.
JavaScript (URL API):
function getDomain(urlOrEmail) {
if (urlOrEmail.includes('@'))
return urlOrEmail.split('@')[1]?.toLowerCase() ?? null;
try {
const u = new URL(urlOrEmail.startsWith('http') ? urlOrEmail : 'https://' + urlOrEmail);
return u.hostname?.toLowerCase() ?? null;
} catch { return null; }
}Python:
from urllib.parse import urlparse
def get_domain(s):
if '@' in s:
return s.split('@')[-1].lower() if s.split('@')[-1] else None
if not s.startswith(('http://', 'https://')):
s = 'https://' + s
try:
return urlparse(s).hostname or None
except Exception:
return NoneRegex (candidate URLs and emails):
/https?:\/\/[^\s<>"')],]+/gi // URLs
/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9][-a-zA-Z0-9.]*\.[a-zA-Z]{2,}/gi // EmailsURL to Domain Converter
Use this tool as a URL to domain converter: paste full URLs and get back the hostname (domain) for each. Enable "Normalize to registrable domain" to convert https://blog.example.com/page to example.com.
Root Domain Extractor
A root domain extractor returns only the registrable (root) domain—e.g. example.co.uk from api.mail.example.co.uk. Use the "Extract root domains" quick button or enable "Normalize to registrable domain" in options.
Domain Parser for Logs
This tool works as a domain parser for logs: paste server logs, crawl output, or access logs and extract every hostname. Enable "Show domain frequency" to count how often each domain appears—ideal for log analysis and security review.
Extract domains from URLs (bulk URL lists)
Use this bulk domain extractor to extract domain from url list or get root domains from urls. Paste a list of URLs and enable "Normalize to registrable domain" to get domain from urls as a single root per site.
Input URLs:
https://blog.example.com/page\nhttps://mail.example.com/login\nhttps://example.com/about
Output domains (with "Normalize to registrable domain"):
example.com
Bulk Domain Extractor
This bulk domain extractor can process very large inputs including server logs, crawl data, and URL lists. The tool uses browser workers and windowed rendering to handle tens of thousands of domains efficiently without sending any data to a server.
What is a domain?
A domain is the human-readable address of a website (e.g. example.com). It maps to an IP address via DNS. When you extract domains from text, you pull out these hostnames from URLs, emails, or logs—useful for analysis, deduplication, or security.
What is a subdomain?
A subdomain is a prefix before the main domain (e.g. api.example.com, www.example.com). The root (registrable) domain is the part you can register (example.com). A bulk domain extractor can show only root domains by removing subdomains—handy when you need unique sites, not every subdomain.
How domain extraction works
This domain extraction tool scans your input for URL-like strings, email addresses, and bare domain names. It uses the browser’s URL parser when possible (so get domain from URL is accurate and supports international domains). Multi-part TLDs like .co.uk are handled with a curated list so the root domain is correct.
Domain vs URL
A URL includes protocol, host, path, and query (e.g. https://example.com/page?q=1). The domain is just the hostname (example.com). When you parse domains online, you often want only the hostname—this tool strips protocol, path, and query so you get a clean list of domains.
Why remove subdomains?
Removing subdomains gives you the registrable domain only. That helps when counting unique sites, grouping by brand, or building blocklists. For example, api.service.co.uk and www.service.co.uk both become service.co.uk—our free domain extractor uses a multi-part TLD list so .co.uk is treated as one unit.
Bulk domain extraction use cases
Bulk domain extraction is useful for: cleaning crawl logs, analyzing backlinks, building allowlists or blocklists, deduplicating URL lists, extracting domains from email headers, and preparing data for DNS or security tools. Export as TXT, CSV, or JSON for use in spreadsheets or scripts.
Extract domains from text (logs, docs, tutorials)
You can extract domains from text in server logs, crawl outputs, or tutorial content. Paste log lines or article text and the tool will find URLs, markdown links, and bare domain names. Use "Paste (clear format)" to normalize messy paste from CSV or logs. This domain extraction tool ignores IP addresses so you get only hostnames.
Extract domains from emails
To extract domains from emails, paste any list of email addresses (or email headers). The tool will automatically detect emails and extract the domain after @, then you can dedupe and export.
Domain extraction for SEO analysis
Domain extraction for SEO analysis helps when auditing backlinks, comparing competitor domains, or building site lists. Extract domains from a list of URLs, remove subdomains to group by root domain, and use the TLD filter or percentage breakdown to see distribution. Export as CSV for use in parse domains online workflows or spreadsheets.
Domain extraction for security analysis
Domain extraction for security analysis helps identify hostnames in phishing reports, blocklists, or email headers. Extract root domains to see unique brands or registrants. All processing is browser-side so sensitive text is never uploaded.
Security and phishing analysis use cases
For security and phishing analysis, extract domains from email headers, report text, or blocklists. Filter to root domains to see unique brands or registrants. The tool does not store or send data—everything runs in the browser, so you can extract domain from email and sensitive text without exposing it. Use with allowlists or blocklists for safe link checking.
Domain list cleaning workflows
Domain list cleaning is easier with normalize options: remove trailing dots, dedupe www and non-www, and normalize case. Get a unique, sorted list and export as TXT (one per line), CSV (with root and TLD columns), or JSON for developer workflows. This bulk domain extractor supports internationalized domains (IDN) via native URL parsing and excludes IPs for a clean, hostname-only list.