Yueseryueser.com

← All guides

How to Extract Every URL from a Block of Text

When a page of notes holds a dozen links, selecting them one at a time is slow. Paste the whole block and the http and https addresses come back in the order they appear, one per line.

Open the tool:Extract URLs

When you need the links in one place

Competitive research ends with forty open tabs and links scattered through notes. Collecting them into one list is what makes it possible to open each, check it and move it into a table. Copying by hand loses entries and sometimes grabs a heading instead of the address.

The other case is cleaning up a chat log or comment thread: someone posted a run of shared links, and they need to be archived, sent for review, or checked for duplicates.

Why stray characters appear at the end

The rule is simple: start at http:// or https:// and keep going until whitespace, a quote or an angle bracket. Everything else counts as part of the link. Chinese punctuation and Han characters are 'everything else', so extracting from "see https://a.com/x,and more" carries the comma and the following characters into the result.

The fix is to paste one link per line and put a space or newline after a link that ends a sentence. Then scan the endings and delete any commas, full stops or CJK characters that came along, so the addresses are actually usable.

What to check before trusting the list

The tool only finds addresses in text. It does not open them or know whether they still resolve, so short links, login-walled pages and retired campaign URLs all come back unchanged. Open a few before working through the batch, and confirm the domains are the ones you expect.

The boundaries are clear too: mailto:, ftp:, relative paths such as /tools/ and protocol-less domains are not recognised, and nothing is deduplicated or completed. Run the result through the deduplicator if needed, and use a link checker or a script to expand short links or read status codes.

FAQ

Are links without http recognised?

No. The rule requires an http:// or https:// prefix, so bare domains and protocol-relative addresses are skipped. If the source is full of those, complete them into full links before extracting, or use a tool that accepts bare domains.

Why does Chinese text end up inside the extracted link?

Because matching stops only at whitespace, quotes or angle brackets, and Chinese punctuation and characters are none of those, so they count as part of the link. Delete the trailing characters by hand, or paste one link per line with a space after it.

Are the extracted links safe to open?

The tool only locates addresses in text; it does not inspect or block anything. Confirm the source is trustworthy before opening, be especially careful with unfamiliar short links, and never enter credentials on a page you reached that way.

Related tool:Extract URLs