HTML Link Generator

Generate an HTML anchor element.

What the anchor element does

The <a> anchor is the element that makes the web a web — its destination is supplied with the href attribute. It is the standard way to create a clickable hyperlink to another page, a file, a section of the current page, or a non-http resource like an email address. Whatever text or markup sits between the opening and closing tags becomes the visible, clickable link, and doubles as the accessible name that screen readers announce.

How to use this generator

  1. Type the visible label into Link text.
  2. Paste the destination into URL — an absolute address like https://example.com/page, a relative path, or a mailto:/tel: link.
  3. Click Run and copy the resulting <a> tag.

Example markup

<a href="https://neatjson.com/blog/url-encoding-explained" target="_blank" rel="noopener noreferrer">
  Read our guide to URL encoding
</a>

Add target="_blank" only when opening a new tab genuinely helps the user, and pair it with rel="noopener noreferrer" — see below for why. A title attribute can supply extra context on hover but isn't a substitute for descriptive link text.

Frequently asked questions

Why does target="_blank" need rel="noopener noreferrer"?

A tab opened this way can otherwise reach back into the page that linked to it via window.opener — reverse tabnabbing. rel="noopener" blocks that; adding noreferrer also stops the Referer header being sent.

How do I link to an email address or phone number?

Use the mailto: and tel: schemes as the href value, e.g. <a href="mailto:you@example.com"> or <a href="tel:+15551234567">. Mobile browsers open the dialer directly for tel: links.

What makes link text accessible?

Screen readers can list every link's text out of context. "Click here" tells that list nothing. Write link text that stands alone, like "Download the 2026 pricing PDF".

Can a link jump to a section of the same page?

Yes — set href to #id where id matches an element on the page, e.g. <a href="#pricing"> scrolls to <section id="pricing">, no JavaScript needed.