FormatterHQ

URL Extractor

Paste text, a chat log or HTML source and get a clean list of every URL in it – http, https, ftp and www. links, plus href and src attributes – with duplicates removed.

Input TEXT
Output TEXT
Ready.

How to use the URL Extractor

  1. Paste your text or HTML source into the input box, or open a file.
  2. Choose the options: remove duplicates, strip trailing punctuation, domains only, order and separator.
  3. For relative links such as /contact in HTML, tick Relative links in href/src and enter the page address as the base URL.
  4. Copy or download the list of URLs.

URL extractor for text and HTML

This URL extractor finds every web address in the text you paste and returns them as a list. It handles plain text such as e-mails, chat exports, documents and log files, as well as HTML source code, where it also reads the href, src and srcset attributes. Use it to collect the links from a newsletter, list the images a page loads, check the links in a document or gather the domains mentioned in a report.

What it finds

  • Addresses starting with http://, https:// or ftp://.
  • Addresses starting with www., even without a scheme. A www. that is part of an e-mail address is ignored.
  • With Relative links in href/src ticked: relative paths in href, src, srcset, action, poster and data-src attributes, such as /about or img/logo.png. Anchors (#top), mailto:, tel:, javascript: and data: values are skipped.

Bare domains without www. or a scheme, such as example.com in a sentence, are not detected. That avoids treating file names like report.pdf or version numbers as links.

Example

Release notes (https://example.com/blog/release-2.4).
Wiki: https://en.example.org/wiki/Markup_(computing).
<a href="https://shop.example.com/cart?item=42&amp;qty=1">Buy</a>
Duplicate: https://example.com/blog/release-2.4.

gives

https://example.com/blog/release-2.4
https://en.example.org/wiki/Markup_(computing)
https://shop.example.com/cart?item=42&qty=1

The closing bracket and full stop after the first link belong to the sentence, so they are removed, while the brackets inside the wiki address are balanced and kept. The &amp; HTML entity in the href becomes a plain &, and the duplicate is dropped.

Options explained

  • Remove duplicates: keeps the first occurrence of each exact URL.
  • Strip trailing punctuation: removes . , ; : ! ? quotes and unmatched closing brackets from the end of each URL. Turn it off if your URLs really end with such characters.
  • Domains only: returns the host name of each URL, such as shop.example.com, in lower case. Combine with Drop www. and Remove duplicates to get a list of unique domains.
  • Base URL: with relative links on, enter the address of the page the HTML came from and relative links become full URLs (for example, /contact on https://example.com/shop/ becomes https://example.com/contact). Leave it empty to list them as written.
  • Order and Separator: keep the order of the text or sort A → Z or Z → A, and separate the results by new lines, commas, semicolons or spaces.

Links in Markdown, e-mails and chats

Markdown links such as [docs](https://example.com/docs) give just the address: the closing bracket has no opening one inside the URL, so it is removed. Plain-text e-mails often wrap links in angle brackets, <https://example.com/a>; the extractor stops at the bracket. Quotes and backticks end a URL too, so links inside code samples come out clean.

How duplicates are compared

Remove duplicates compares the full URLs exactly. https://example.com/a and https://example.com/a?utm_source=news are different addresses and both stay, as do the http and https versions of the same page. If you only care about which sites are linked, switch on Domains only: then every link to the same host collapses into one line.

Next steps with your list

To see the parts of a single address – protocol, host, path and query parameters – paste it into the URL Parser. To sort a combined list from several pages, use Sort Text Lines, and to get the readable text of an HTML page without its tags, use the HTML Stripper. The extraction runs in your browser, so the text and HTML you paste are not uploaded.

Frequently asked questions

How do I extract all links from a web page?
Open the page, view its source (Ctrl+U in most desktop browsers), copy everything and paste it here. Tick Relative links in href/src and enter the page address as the base URL to get relative links as full URLs too.
Why does a URL end without its closing bracket?
With Strip trailing punctuation on, a closing bracket is removed only when the URL has no matching opening bracket, as in “(see https://example.com)”. Addresses with balanced brackets keep them. Turn the option off if you need the raw text.
Can I get only the domain names?
Yes. Tick Domains only to turn every URL into its host name, and Drop www. to merge www.example.com with example.com. Keep Remove duplicates on for a list of unique domains.
Why is example.com in my text not found?
Without http://, https://, ftp:// or www., a name with a dot cannot be told apart from file names and version numbers, so it is not treated as a link. Add the scheme or www. if you need it extracted.
Does it check whether the links work?
No, it only finds them. The extractor does not visit any address; all processing happens in your browser.

Last updated October 17, 2026

Related tools

Delimited Text Extractor Extract one or more columns from CSV, TSV, pipe or any delimited text by column number. Email Extractor Extract e-mail addresses from any text: remove duplicates, sort, lowercase, filter by domain and choose a separator. Shows a count. Word Counter Count words, characters, sentences, paragraphs and lines, and estimate reading and speaking time. Word Frequency Counter Count how often each word appears in a text and rank them by frequency with percentages. Word Repeater Repeat one word or a short phrase N times with a space, comma, new line or no separator, for drills, filler text and length tests. Word Replacer Rename a word or name across a document with whole-word matching, optional case sensitivity and a count of replacements. Word Sorter Sort the words of a text alphabetically, by length or randomly, and output them on one line or one per line. Add Line Numbers Number every line of text: choose the start number, step, format (1. 1) 1:), zero padding, and whether empty lines get a number. Add Prefix and Suffix to Lines Add text to the start and end of every line at once: quote list items, add bullets, commas or HTML tags. Skip empty lines, trim spaces. Alphabetical Order Put a list into alphabetical order (A–Z or Z–A), optionally ignoring leading articles like "The". ASCII Art Text Generator (FIGlet) Turn text into large ASCII art banners with 30 FIGlet fonts. Wrap them as code comments for README files, CLIs and source headers. Case Converter Convert text to UPPER, lower, Title, Sentence, camelCase, snake_case, kebab-case, PascalCase and more.