Domain extractor: pull hosts from text

Extract unique domains from pasted text or HTML. No crawl, no upload.

Was this helpful?
Share Tool

Paste a log, email, HTML dump, or messy URL list. The extractor runs a hostname regex in this tab, lowercases matches, and de-duplicates them. FlashKit never sees the paste. It does not fetch the hosts and does not crawl the web.

Worked example. Paste “Visit https://www.Example.com/path and mirror.example.com — also Example.com/again.” The unique list is example.com and mirror.example.com. www is kept when it is part of the matched host (www.example.com is a different string from example.com). Paths, ports, and query strings are dropped.

Use it to clean a crawl export or a partner list you already have the right to process. Do not use extracted domains to send unsolicited email. Sheets formulas, the public-suffix problem, and a worked 6-row sample: extract domains from a list of URLs.

How to extract domains from text

  1. Paste the text, HTML, or log file contents.
  2. Press extract. Duplicates are collapsed and lowercased.
  3. Copy the unique host list.
  4. Follow up with WHOIS or a metadata extract only on domains you are allowed to query.

Key Features

  • Client-side parse — no upload
  • Unique, lowercased domain list
  • Works on messy HTML and plain text
  • No FlashKit account

What the regex keeps and drops

  • Keeps host-like tokens: labels, dots, common TLDs. Drops schemes (https://), paths, and query strings.
  • Emails are not the target. Use the email extractor for addresses; this page is hosts.
  • IP addresses are not listed unless they look like a hostname. Use domain-to-IP when you already have a name.
  • Internationalized labels in Unicode may not match. Convert with the Punycode tool first, then extract the xn-- form.

One paste, and the unique list it really returns

  • Paste: See https://www.Example.com/path, mirror.example.com, Example.com/again, user@mail.example.org, file.txt, 192.168.1.1, 192.168.10.20, localhost, a.b, and shop.example.co.uk.
  • After lowercase and de-duplication, in first-seen order, the list is www.example.com, mirror.example.com, example.com, mail.example.org, file.txt, 192.168, 192.168.10.20, shop.example.co.uk. www.example.com and example.com are both kept. The email contributes mail.example.org, not the user name. localhost and a.b are absent.
  • 192.168.1.1 does not survive whole. The pattern requires a final label of at least two characters, so the match stops at 192.168. 192.168.10.20 does survive, because 20 is two characters. file.txt survives. report.pdf survives. v1.2.3 does not.

Mistakes that look like a clean host list

  • A filename with a dot is a hit. So is a version fragment when both sides of the dot are long enough. Sort those out by hand. The page does not know a public suffix, so shop.example.co.uk is one string. It is not shortened to example.co.uk.
  • Unicode labels are not matched. An xn-- label is matched, because it is ASCII. Convert first if the paste is still in Unicode. Paths and ports are not separate columns. They simply fall outside the match, which is why example.com remains from example.com/again.
  • Order is first appearance, not alphabetical. A later duplicate disappears. The count on the output is the unique count, not the number of times a host was mentioned.

How to clean a log without harvesting a list

  • Paste the log, extract, and delete the rows that are filenames or truncated addresses before you copy. Then decide which hosts you are allowed to look up. The page does not fetch any of them.
  • Use the email extractor when you wanted mailboxes. Use the link extractor when you wanted href values. This page is only the host-shaped tokens. Read the unique list from top to bottom once before you copy it into a spreadsheet, and delete file.txt-style rows and truncated addresses such as 192.168 while they are still obvious.

Frequently Asked Questions

Does this crawl the web?

No. It only reads what you paste.

Will it pick up emails?

Use the email extractor for addresses. This page focuses on hosts and URLs.

Are results unique?

Yes. Matches are lowercased and de-duplicated in this tab. Order follows first appearance.

Expert Guide for Domain Extractor

View Blog
Domain Extractor — URL to Domain

Domain Extractor — URL to Domain

Use FlashKit’s free online domain extractor to turn a URL list into unique hosts. URL to domain, plus registrable domain vs hostname, Sheets and regex.

Read Guide

Categories

Browse all FlashKit tools