Skip to main content

HTML Hyperlink Generator

API reference

Generate an HTML <a> link tag — set the URL, link text, target, title and SEO rel values (nofollow, sponsored, ugc), with safe new-tab defaults, then copy the ready-to-use HTML. Free, instant, no AI involved.

A bare domain like example.com gets https:// added. javascript: and data: links are refused.

The clickable text. Leave blank to use the URL itself.

Settings

Stops the opened page from controlling this one through window.opener.

Don't pass ranking credit to the target.

Paid, affiliate or advertising links.

Links inside user-generated content such as comments.

Only needed when the link text alone doesn't describe the destination (e.g. “Read more”).

Adds the download attribute so the browser saves the file instead of opening it (same-origin links only).

Add custom CSS classes to the element. Separate multiple classes with spaces.

HTML
 
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/html-generator/hyperlink \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customHref": "https://example.com",
    "customText": "Visit Example",
    "customTarget": "_self",
    "customSafeNewTab": "true"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `html-generator__hyperlink` tool (HTML Hyperlink Generator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/html-generator/hyperlink/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="HTML Hyperlink Generator — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits
Need more credits?View pricing

Also available with

Guides

Build a ready-to-paste HTML <a> link. Set the URL and link text, choose where it opens, add a tooltip and the SEO rel values search engines expect, then copy the generated HTML.

Runs entirely in your browser: no AI call, no credits, no network round-trip. The output updates instantly as you type.

How to use it

  1. Enter the Link URL. Full URLs, site paths (/about/), anchors (#pricing), mailto: and tel: links all work. If you type a bare domain such as example.com, https:// is added for you. Without it, browsers would treat the link as a relative path on your own site.
  2. Enter the Link Text, the words people click. Leave it blank to show the URL itself.
  3. Under Settings, pick where the link opens and tick any rel values you need.
  4. Copy or download the generated HTML.

Which rel value should I use?

  • noopener noreferrer is added to new-tab links by default. It stops the opened page from reaching back into yours through window.opener.
  • nofollow tells search engines not to pass ranking credit to the target.
  • sponsored marks paid, affiliate or advertising links. Google asks for it on any link you were paid to place.
  • ugc marks links in user-generated content such as comments and forum posts.

You can combine them. For example, an affiliate link is often rel="sponsored nofollow".

Accessibility tips

  • Write link text that makes sense on its own. "Download the 2026 price list" is clearer than "click here".
  • Use ARIA Label only when the visible text can't carry the meaning, such as a row of "Read more" links.
  • A title tooltip is not announced reliably by screen readers, so don't put essential information only there.

javascript:, data: and vbscript: URLs can run code when clicked, so the generator won't write them.

Why is there no live preview?

A real link inside this page would navigate away when clicked. Paste the code into your own page to see it in context.

htmlhyperlinklinkanchora taghrefnofollowgenerator

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.