WebToolsPlanet
Developer Tools

Hyperlink Generator

Fill in the link details — URL, text, target, rel, and optional attributes — and get the ready-to-paste `<a>` tag with a live preview.

Last updated: May 26, 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 Hyperlink Generator?

HTML anchor tags (`<a>`) are the foundation of web navigation. Beyond `href` and link text, they accept a range of attributes: `target` controls where the link opens, `rel` declares the relationship to the linked resource (important for SEO and security), `title` adds a tooltip, and `class`, `id`, and `style` handle appearance.

The `noopener noreferrer` rel value is a security best practice for any link that opens in a new tab — without it, the opened page can access the opener's window object via `window.opener`. This tool automatically adds `noopener noreferrer` when `target="_blank"` is selected, and you can toggle it off if needed.

How to Use Hyperlink Generator

1

Enter the destination URL in the "URL (href)" field.

2

Enter the link text.

3

Choose a target (leave empty for same-window navigation, or _blank for a new tab).

4

Add optional attributes: title, rel, class, id, style.

5

Copy the generated <a> tag.

Common Use Cases

  • Generating anchor tags with correct noopener noreferrer for external links.
  • Creating download links with the download attribute.
  • Building links with specific classes for CSS frameworks (e.g. Bootstrap buttons).
  • Adding rel="nofollow" or rel="sponsored" for SEO link declarations.
  • Quickly testing different target and rel combinations.

Example Input and Output

An external link opening in a new tab with security attributes.

Options
href=https://example.com, text=Visit Example, target=_blank, noopener=true
Generated HTML
<a href="https://example.com" target="_blank" rel="noopener noreferrer">Visit Example</a>

Privacy

All generation happens in your browser. No URLs are sent to a server.

Security

Always use noopener noreferrer with target="_blank" to prevent tab-napping attacks, where the opened page could redirect the opener page.

Frequently Asked Questions

Why add noopener noreferrer?
Without noopener, a page opened in a new tab can access the opener page via window.opener — a potential phishing vector. Adding rel="noopener noreferrer" removes that access and also prevents the Referer header from being sent.
What does the download attribute do?
When present, clicking the link triggers a download instead of navigating. The attribute value (if provided) becomes the suggested filename.
When should I use rel="nofollow"?
Use nofollow for user-generated content or paid links to tell search engines not to pass PageRank to the linked URL.