How to pull links out of a block of text
- 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.
- Pick the schemes you want. HTTP and HTTPS are both ticked by default. Untick HTTP to keep only
https://links, for example. - Untick Include query and fragment if you want everything from
?or#onward cut off each link. - Tick Keep first-seen order to list links in the order they appear in the text. Otherwise the list is sorted alphabetically.
- Click Extract URLs. The list also refreshes about a quarter of a second after you stop typing, and whenever you change an option.
- 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.
Examples of extracted links
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"giveshttps://site.com/a. Relative links such as/aboutare 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/apiorhttps://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://orhttps://are matched. A barewww.example.orgorexample.comwithout a scheme is not picked up.ftp://,mailto:,javascript:anddata: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 ashttps://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/../bbecomes/b). - HTML entities are not decoded, so
&copied from page source stays in the query:https://a.com/?a=1&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.