Skip to content
MyToolkit.pro

Text extraction

Extract URLs from text

Pull every http and https link out of a block of text, trim trailing punctuation, remove duplicates and get a clean, sorted list. Everything happens in your browser.

Private by design: no text is uploaded or stored.

Private by design: no text is uploaded or stored.

Extraction options

Try an example

Result

Updates when you run the tool.

URLs found
0

Matched URLs

A link opens only after you choose Open link.

No matching web URL was found.

How links are found

The tool matches http:// and https:// links, strips trailing punctuation such as a sentence period or a closing bracket, removes exact duplicates and sorts the rest. Only web schemes are matched, so javascript: and data: links are ignored — nothing is ever fetched or opened.

  1. Paste your text into Text to scan. Emails, chat logs, Markdown, HTML source and log files all work, and the field accepts up to 1,000,000 characters.
  2. Pick the schemes you want. HTTP and HTTPS are both ticked by default. Untick HTTP to keep only https:// links, for example.
  3. Untick Include query and fragment if you want everything from ? or # onward cut off each link.
  4. Tick Keep first-seen order to list links in the order they appear in the text. Otherwise the list is sorted alphabetically.
  5. Click Extract URLs. The list also refreshes about a quarter of a second after you stop typing, and whenever you change an option.
  6. Click Copy result to copy the full list with one URL per line. The Copy domains button next to it copies only the unique host names.

Under the count you get a table with one row per unique URL. Each row shows the domain, the path, the query or fragment, how many times the URL occurred and the character position where it first appears. Below the table, every domain is listed with its total number of matches, so you can see at a glance which sites a document links to most.

In plain prose, a period at the end of a sentence is removed from the link:

Input:  See https://mytoolkit.pro/tools and http://example.com/page.
Output: http://example.com/page
        https://mytoolkit.pro/tools

Angle brackets end a match, and a closing bracket or comma right after a link is trimmed, so Markdown links come out clean. Host names are also lowercased, which is why these two links count as one URL with 2 occurrences:

Input:  Docs: [guide](https://example.com/docs?lang=en#install), mirror <https://EXAMPLE.com/docs?lang=en#install>
Output: https://example.com/docs?lang=en#install

Tracking parameters make otherwise identical links look different. With Include query and fragment turned off they merge into one:

Input Query on Query off
https://b.com/x?utm_source=news https://b.com/x?utm_source=mail 2 URLs (one per utm_source) https://b.com/x (1 URL)

With Keep first-seen order ticked, https://z.com/1 https://a.com/2 stays in that order. Without it, https://a.com/2 comes first.

Where a URL extractor saves time

  • Link audits: paste the HTML source of a page to list every absolute URL it references, including links, scripts, images and namespace addresses. The quote around an attribute ends the match, so href="https://site.com/a" gives https://site.com/a. Relative links such as /about are not included.
  • Newsletters and campaigns: turn off the query option to collapse UTM-tagged variants into one clean link per landing page. To inspect the parameters you removed, paste one link into the Query String Parser.
  • Chat and ticket exports: collect every link shared in a Slack or support thread into a list you can paste into a spreadsheet.
  • Server logs: pull referrers or callback URLs, including addresses like http://localhost:8080/api or https://192.0.2.1/x, and use the Occurrences column to find the most frequent ones.

What the extractor matches and what it skips

  • Only addresses that start with http:// or https:// are matched. A bare www.example.org or example.com without a scheme is not picked up. ftp://, mailto:, javascript: and data: links are skipped too.
  • A link ends at whitespace, at <, >, quotes or a backtick. Trailing characters such as . , ; : ! ? ) ] } are then trimmed. That fixes sentence punctuation, but a URL that genuinely ends in one of those characters loses it.
  • Links are normalised before duplicates are counted. The host is lowercased and internationalised domains are converted to punycode, so https://bücher.example/ is listed as https://xn--bcher-kva.example/. Paths keep their letter case, but non-ASCII characters in a path are percent-encoded (/zażółć becomes /za%C5%BC%C3%B3%C5%82%C4%87) and .. segments are resolved (/a/../b becomes /b).
  • HTML entities are not decoded, so &amp; copied from page source stays in the query: https://a.com/?a=1&amp;b=2.
  • Text that looks like a link but cannot be parsed as a valid URL is dropped silently, not shown as an error.
  • Links are never requested or checked. A link opens in a new tab only when you click Open link in its row. To find out whether a URL still works, open it or use the HTTP Headers tool.

Addresses are parsed with the browser's URL parser as defined in the WHATWG URL Standard. The lowercasing, punycode conversion and percent-encoding all come from that parser.

Frequently asked questions

Can I extract hyperlinks from a Word document or PDF?

Copy the text from the document and paste it here; for a PDF you can first run [Extract text from a PDF](/en/tools/pdf-text-extractor). Only links whose full address is visible in the text will be found, because a hyperlink hidden behind anchor text such as "click here" does not carry its URL into plain text.

Can I extract URLs from an Excel or CSV file?

Yes. Select the cells in your spreadsheet and paste them in; cells arrive separated by tabs and line breaks, which end a link. In raw CSV, a link wrapped in quotes or on its own line is found correctly.

How do I get only the domain names instead of full URLs?

After extracting, click Copy domains. It copies each host name once, one per line, without the scheme, path or query.

Why does the same page appear twice in my list?

The `http://` and `https://` versions of an address are separate rows; untick HTTP to keep only https. Paths are also case-sensitive, so `https://a.com/Path` and `https://a.com/path` are two rows, and links that differ only after `?` or `#` merge when you turn off the query and fragment option.

All in Text & Lists

Extract emails from text

Find every e-mail address in a block of text, remove duplicates and get a clean, sorted list — one address per line. Everything happens in your browser.

Text & Lists In your browser

Slug generator

Turn any title into a clean, SEO-friendly URL slug. Transliterates accents (ą→a, ß→ss), lets you pick the separator and runs entirely in your browser.

Text & Lists In your browser

Strip HTML tags

Turn HTML into clean, readable plain text. Tags are removed, the contents of script and style blocks are dropped, and common HTML entities are decoded. Runs in your browser.

Text & Lists In your browser

Extract text from a PDF

Pull the text out of a PDF into a plain .txt file. Free, no account, files deleted after 60 minutes.

Document Converters File on the server

Query String Parser

Parse a URL query string in your browser. Paste a query string or a full URL and read every key=value pair as lines or JSON, with percent-decoding. Nothing is uploaded.

Code & Data In your browser

What do you need?

Swipe up for the next one