All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Audio Tools Font Tools Image Tools Subtitle Tools Video Tools
Archive Tools Document Tools Ebook Tools File Management Tools PDF Tools Presentation Tools
Config Tools Database Tools Dataset Tools JSON Tools Parser Tools Spreadsheet Tools XML Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Extract Domain Names

Paste plain text, a list of URLs, or raw HTML and get a clean list of the domain names and hostnames it contains. Only the host is kept - any path, query string, or fragment is stripped away. Case is normalized, the www prefix can be removed, and subdomains can be kept or reduced using the tool's built-in suffix rules.

How to extract domain names from text

How to extract domain names

  1. Paste content into Input text, or select Upload and choose a supported file.
  2. Set Unique only, Lowercase (normalize case), Strip www prefix, and Keep subdomains.
  3. Review Extracted hosts, including each Host, Line, and Context entry.
  4. Select Copy or Download to take the list with you.

Extract hostnames from URLs and HTML

The parser scans ordinary sentences, URL lists, and raw HTML source for hostname-shaped text. It keeps the host and drops the protocol, path, query string, and fragment. HTML is read as text, so tags are not parsed or checked as a document.

Input:  https://www.Example.com/products?ref=42
        http://blog.EXAMPLE.com/post/1#intro
Output: example.com
        blog.example.com

A match must end with a final label in the built-in KNOWN_TLDS set. Labels may contain ASCII letters or numbers, with hyphens inside a label. A valid hostname with an unlisted or newer suffix can be left out. The result is a text match, so the tool does not check DNS or ownership.

What the domain extraction options change

  • Unique only keeps the first formatted occurrence in input order. Clear it to keep repeats. The tool deduplicates after applying the other selected options.
  • Lowercase (normalize case) converts the returned host to lowercase.
  • Strip www prefix removes a leading www..
  • Keep subdomains retains labels such as mail.. Clear it to reduce the hostname with the built-in suffix rules.
Input:  https://sub.domain.co.uk/path
Keep subdomains: on   sub.domain.co.uk
Keep subdomains: off  domain.co.uk

Review and download extracted domain names

Upload accepts .txt, .csv, .json, .log, .html, and .htm. The result count reports the formatted hosts that remain. Output text puts one host on each line, and the table shows Host, Line, and Context.

Copy places the output list on your clipboard. Download saves it as domains.txt. The extraction script processes entered text in the browser and contains no request that submits it elsewhere.

Where extracting hostnames comes up

Paste HTML source when you need the hosts appearing in a page draft. For a log excerpt, the table places each retained host beside its source line and context.

When you need the full links, use Extract URLs from Text. For addresses, choose Extract Emails from Text; for a pattern that does not match hostname rules, use Custom Regex Extractor. These tools sit in Text Parsing & Data Extraction.

Frequently asked questions

How do I extract domain names from a URL list?

Paste the URL list into Input text, set the four options, and read the hosts in Output text and Extracted hosts. Each URL contributes its host without its path, query string, or fragment.

Can I extract hostnames from HTML source?

Paste the raw HTML into Input text. The parser scans it as text for hostname-shaped matches and does not parse or check the HTML document.

What does Keep subdomains do when extracting domain names?

Keep subdomains preserves labels such as blog. in blog.example.com. Clear it to apply the built-in suffix rules, which include two-label suffixes such as co.uk and com.au.

Why did Extract Domain Names find no hosts?

No hosts found means no match passed the hostname pattern and built-in final-label check. Output text remains empty, and the results table stays hidden.

Does Extract Domain Names send pasted text to a server?

The extraction script processes entered text in the browser. Its local code contains no request that submits the text.

Related Tools

46 views