HTML Link Generator
Generate HTML anchor tags with href, target, rel, title, download, and other attributes. Copy ready-to-use link code instantly.
- Input stays on your device
Last updated:
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat 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
Enter the destination URL in the href field
Enter the link text that users will see
Choose the target (same tab, new tab, etc.)
Add optional attributes like rel, title, id, class
Enable download if the link should trigger a file download
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.
href: https://example.com
text: Visit Example
target: _blank
rel: noopener noreferrer<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.
Related Tools
HTML Button Generator
Generate HTML button elements with type, id, class, style, onclick, disabled, aria-label, and other attributes. Preview included.
Meta Tag Generator
Generate SEO title tags, meta descriptions, Open Graph, and Twitter Card tags for any webpage.
HTML Table Generator
Generate HTML table code with configurable rows, columns, headers, borders, captions, and attributes. Copy ready-to-use table markup.
HTML Element & Tag Generator
Generate clean semantic HTML elements with live preview — <pre><code>, <details>, <fieldset>, <figure>, <progress>, <meter>, <mark>, <strong>, <em>, <u>, <s>, <sub>, <sup>, <q>, <cite>, and <bdo>.
HTML Form Input Generator
Generate accessible HTML form controls — text, email, URL, tel, search, number, range, date/time, color, file, image, checkbox, select, textarea, and submit — with live preview.
HTML Audio Generator
Generate HTML <audio> elements with multiple source formats, controls, autoplay, loop, muted, and preload options. Copy ready-to-use code instantly.

