<link rel="stylesheet" type="text/css" href="/mirawhite.css">

Extract URLs from text

Paste an email, a document or the source of a web page: every link is listed as plain text, one per line, ready to check or to paste into a spreadsheet. Free, no sign-up.

Free, no sign-up, no limit Runs in your browser: your text and files are never sent or saved.

Extract URLs from text

Options

How to use it

  1. Paste the text or the HTML code that contains the links.
  2. Choose whether to include links written without http://, to remove duplicates or to keep only the domain names.
  3. Copy the list or download it as a .txt file.

Example

Input

Guide: https://example.com/guide?page=2&lang=en. See (https://en.wikipedia.org/wiki/Mercury_(planet)) and www.example.org/news, or https://example.com/guide?page=2&lang=en again.

Output

https://example.com/guide?page=2&lang=en
https://en.wikipedia.org/wiki/Mercury_(planet)
www.example.org/news

Good to know

  • Links without http:// are found when they start with www. or end with a common extension (.com, .org, .fr, .io…): “index.html” is not taken for a website.
  • A period, comma or closing parenthesis at the end of a link is treated as punctuation, unless the parenthesis was opened inside the link, as in Wikipedia addresses.
  • Relative links in HTML (href="/page") are skipped: they have no domain.
  • The links are never opened or checked, and the result is not clickable, so a malicious link cannot be followed by mistake.

Frequently asked questions

How do I extract all the links from a web page?

Open the page source (Ctrl+U in most browsers, or right-click > View page source), select all, copy and paste it here: every absolute link in the HTML is listed once. Relative links such as href="/page" are skipped because they have no domain.

How do I extract URLs from an XML sitemap?

Open the sitemap.xml in your browser, copy its content and paste it here: each URL inside the <loc> tags comes out on its own line, ready to paste into a spreadsheet or a crawler. Duplicates are removed by default.

How do I extract URLs from hyperlinks in Excel?

Copying the cells only copies the displayed text, not the hidden link. In Excel for Microsoft 365, right-click a cell and choose Edit Hyperlink to see the address, or save the sheet as a web page (.htm), open that file in a text editor and paste its content here to get every link.

How do I get only the domain names?

Tick “Keep only the domain name”: https://www.example.com/blog/post becomes example.com, and with duplicates removed you get the list of distinct sites a text links to.

Is it safe to paste suspicious links?

Yes. The links are never opened or checked, and the result is plain text, not clickable, so a phishing link cannot be followed by mistake. Nothing is sent to a server either.

← Back to all tools