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
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat 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
Enter the destination URL in the "URL (href)" field.
Enter the link text.
Choose a target (leave empty for same-window navigation, or _blank for a new tab).
Add optional attributes: title, rel, class, id, style.
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.
href=https://example.com, text=Visit Example, target=_blank, noopener=true<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.
Related Tools
301 Redirect Code Generator
Generate redirect code for Apache (.htaccess), Nginx, IIS (web.config), PHP, HTML meta refresh, and JavaScript. Supports 301, 302, 307, and 308 status codes.
HTML Beautifier
Format and beautify minified or messy HTML code.
HTML Button Generator
Generate HTML button elements with type, id, class, style, onclick, disabled, aria-label, and other attributes. Preview included.
HTML Cleaner
Clean messy HTML by removing inline styles, scripts, comments, empty tags, Word markup, class and data attributes.
Meta Tag Generator
Generate SEO title tags, meta descriptions, Open Graph, and Twitter Card tags for any webpage.
HTML Image Input Generator
Generate <input type="image"> markup with src, alt, sizing, form override attributes, and live preview. Builds an image-based submit button.

