Advertisements

headerup to 320x100 / 728x90

HTML Link Generator

Build a safe anchor tag with href, optional target="_blank", and rel="noopener noreferrer"

Open in:
Input
Loading editor...
Output

Output will appear here...

Advertisements

content bottomup to 300x250

What is HTML Link Generator

Last reviewed:

HTML (HyperText Markup Language) is the core markup language for web pages, defining structure and content that browsers render.

HTML Link Generator builds a safe `<a>` tag from a URL on line 1 and optional link text on line 2. When you enable 'Open in new tab', the tool automatically adds `target="_blank"` and `rel="noopener noreferrer"` to prevent tabnabbing.

It's ideal for documentation, CMS fields, and email templates that expect raw HTML.

Why use it

  • Generate safe new-tab links quickly.
  • Avoid forgetting rel="noopener noreferrer".
  • Produce consistent anchor tags in docs.
  • Escape user-supplied URLs and text.
  • Build CMS-friendly markup without typos.

Features

  • Adds target="_blank" + rel="noopener noreferrer" safely
  • Escapes text content
  • Optional anchor text
  • Client-side HTML Link workflow, no servers involved
  • Copy-ready HTML

How to use HTML Link Generator

  1. Paste URL. Put the URL on line 1.
  2. Add link text. Optional — on line 2.
  3. Choose tab behaviour. Same tab or new tab, then Run.

Example (before/after)

Input

https://example.com
Visit Example

Output

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

Common errors

Missing rel attribute

target="_blank" without rel="noopener" is a security risk.

Fix: This tool adds noopener noreferrer automatically.

Unescaped < in text

Link text can include < or &.

Fix: The generator escapes < in text automatically.

FAQ

Does it add rel attributes?

Yes — when new-tab is enabled, noopener and noreferrer are included.

Can I pick the anchor text?

Yes — put it on line 2. Line 1 is used as a fallback.

Does it escape text?

Yes — angle brackets are escaped.

Does it validate the URL?

No — any string is used as href. Use a URL parser first to validate.

Is input uploaded?

No — everything is client-side.