WebToolsPlanet
Developer Tools

HTML Link Generator

Configure an HTML anchor tag — href, target, rel, title, download, and more — and get the ready-to-paste code with a live preview.

Last updated: May 21, 2026

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What is HTML Link Generator?

The HTML `<a>` (anchor) element creates hyperlinks between pages, files, email addresses, or any URL. It supports a wide range of attributes that control link behaviour: `target` defines where to open the link, `rel` communicates the link relationship to browsers and search engines, `download` triggers a file download, and `title` provides a tooltip.

This generator lets you configure all standard anchor attributes through a form and generates the correct HTML syntax, including the recommended `rel="noopener noreferrer"` for external links that open in a new tab.

How to Use HTML Link Generator

1

Enter the destination URL in the href field

2

Enter the link text that users will see

3

Choose the target (same tab, new tab, etc.)

4

Add optional attributes like rel, title, id, class

5

Enable download if the link should trigger a file download

6

Copy the generated HTML

Common Use Cases

  • Developers hand-writing HTML who need a quick anchor tag with the right attributes.
  • Content editors adding links to HTML email templates or CMS fields.
  • Developers creating download links that should trigger the browser save dialog.
  • Teams ensuring all external links include rel="noopener noreferrer" for security.

Example Input and Output

An external link that opens in a new tab with proper rel attribute.

Configuration
href: https://example.com
text: Visit Example
target: _blank
rel: noopener noreferrer
HTML output
<a href="https://example.com" target="_blank" rel="noopener noreferrer">Visit Example</a>

Privacy

All HTML generation runs in your browser. No data is sent to any server.

Frequently Asked Questions

Why should I add rel="noopener noreferrer" for _blank links?
Without it, the opened page can access the opener via window.opener, which is a security risk. noopener prevents this. noreferrer additionally hides the referrer header. Browsers now default noopener for _blank links in many cases, but explicitly setting it is still best practice.
What does the download attribute do?
The download attribute tells the browser to download the linked resource instead of navigating to it. You can optionally specify a filename. It works for same-origin resources or data URIs; cross-origin files require appropriate CORS headers.