How to use the HTML link generator
- Enter the URL and the Link text. If the text is empty, the URL is used as the text.
- Add a Title (tooltip, optional) only if it adds information; screen readers often ignore it.
- Choose Open in: Same tab or New tab.
- Tick the rel values you need:
rel="nofollow",rel="sponsored"(paid/affiliate),rel="ugc"(user content). Tick download (save instead of open) for a file link, and fill hreflang (optional) for a page in another language. - Copy the code and read any notes below it.
What it does and when to use it
The a element is the most common tag on the web, and its attributes carry rules that are easy to forget: rel values that search engines expect on paid links, the security pair for new tabs, the download flag for files. The generator applies them for you and keeps the attributes in a consistent order.
It also checks the most common accessibility mistake. Screen-reader users often jump from link to link and hear only the link text, so “click here”, “here”, “read more” or “link” tells them nothing. The tool warns when the text is one of those.
For buttons that perform an action rather than go somewhere, use a button instead; the HTML Button Generator builds one. For a whole menu of links, use the HTML Nav Menu Generator.
How it works
Attributes are written in this order: href, title, target, rel, hreflang, download. target appears only for a new tab. The rel list joins your ticked values and, for a new tab, noopener noreferrer. Values are HTML-escaped, so a URL with & becomes & inside the attribute, which is correct HTML. Everything runs in your browser.
Worked examples
A plain internal link, the default:
<a href="https://toolsrift.com/pdf/pdf-merger">Merge PDFs in your browser</a>
An affiliate link to a German shop, in a new tab, with nofollow and sponsored ticked and hreflang de:
<a href="https://shop.example/item" target="_blank" rel="nofollow sponsored noopener noreferrer" hreflang="de">Desk lamp on Example Shop</a>
A note reminds you to tell visitors that the link opens a new tab.
A file download with weak text. URL https://example.com/report.pdf, text “click here”, download ticked. The output is <a href="https://example.com/report.pdf" download>click here</a> plus the warning that “click here” tells screen-reader users nothing. “Download the 2026 report (PDF)” is better.
Limits and tips
- The tool does not check that the URL works. Test it after publishing.
- Use relative URLs such as
/contactfor pages on your own site so links survive a domain change. - To collect every link on an existing page, use the HTML Attribute Extractor with the elements set to
aand the attribute tohref.
Frequently asked questions
Which rel value should I use for affiliate links?
Why is noopener noreferrer added to new-tab links?
Should links open in a new tab?
Does download work for files on other websites?
What is hreflang for?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.