About HTML Link Generator
Adding a link to a web page, an HTML email or a CMS field that accepts code means writing an anchor tag by hand, and a missing quote or an unescaped ampersand is enough to break it. This generator builds the tag from separate fields: the URL, the visible link text and an optional title tooltip, converting special characters such as &, <, > and double quotes into their safe HTML entities along the way.
You can choose to open the link in a new tab (with rel="noopener" for safety) and add nofollow, sponsored or ugc for paid, affiliate or user-generated links. The output is a single line you can copy with one click. It is handy for bloggers working in an HTML view, people building email signatures, and anyone learning HTML who wants a correct example to start from.
Why use it
- Produces a complete, valid anchor tag with no stray quotes or broken brackets.
- Escapes & in tracking and search URLs, so the markup stays valid.
- One-click Copy puts the code straight onto your clipboard.
- A clean reference example for anyone learning how links work in HTML.
- Runs in your browser with no account, and the URL is never sent anywhere.
How to use
Paste the URL
Type or paste the full address into the box, ideally starting with https:// so it works from any page.
Click Generate code
The anchor tag appears in the result area, using the URL as both the destination and the visible text.
Copy the code
Click Copy to put the tag on your clipboard, then paste it into the HTML or source view of your editor.
Pick the options
Tick "Open in a new tab" or rel options such as nofollow and sponsored if you need them, then copy the tag.
Examples
A link in a blog post
Paste https://example.com/guide and you get <a href="https://example.com/guide">https://example.com/guide</a>, ready for your blog's HTML editor.
A campaign tracking URL
A link containing ?utm_source=news&utm_medium=email. The generator writes the & as & inside the code, which is correct HTML, and the link still works when clicked.
An email signature
Enter your website as the URL and your company name as the link text, generate the tag, and paste it into a signature editor that accepts HTML.
Learning HTML
A student pastes a URL to see how the a element and its href attribute are written, then practises editing the link text.
| Part | What it does | Notes |
|---|---|---|
| <a ...> | Opens the link element | Generated for you |
| href | Sets the destination | Contains your URL, with special characters escaped |
| Text between the tags | What readers see and click | Defaults to the URL; replace it freely |
| </a> | Closes the link | Keep it, or the rest of the text becomes part of the link |
| target="_blank" | Opens in a new tab | Tick the new-tab or rel options in the tool |
Tips
- Always include https://. A link that starts with www. is treated as a path on the current site inside HTML.
- Write descriptive words in the Link text field, such as "Read the full guide", rather than showing the raw URL; it is clearer for readers and search engines.
- To open in a new tab, add target="_blank" rel="noopener" after the href attribute.
- Descriptive link text such as "Download the price list" is better for readers and for SEO than a long raw URL.
- Paste into your editor's HTML or source mode; in the visual mode the code will show up as plain text.
The code is built inside your browser; the URL you enter is not sent to any server.
Frequently asked questions
What code does the tool generate?
One anchor element: <a href="your URL">your URL</a>. Both the destination and the visible text are the URL you entered, with &, <, > and double quotes escaped.
How do I use custom link text?
After copying, replace the part between > and </a> with the words you want. Leave the href value alone so the destination doesn't change.
Why does & become & in the code?
In HTML the ampersand starts an entity, so the correct way to write it inside an attribute is &. Browsers convert it back to & when the link is followed, so the destination is unchanged.
Does the link open in a new tab?
No, the generated link opens in the same tab. Add target="_blank" rel="noopener" inside the opening tag if you want a new tab.
Does it check that the URL works?
No. The tool never visits the address; it only writes the code. Open the URL in your browser to confirm it is correct.
Can I generate several links at once?
No. Each generated tag holds one link, so generate one tag per URL.
What if I leave out https://?
Browsers treat an address without a scheme as a relative path on the current site, which usually leads to a missing page. Use the full URL.
Can I make a mailto link with it?
You can type mailto: in front of an address yourself, but the dedicated Mailto Link Generator on Adwaty is the better fit.
Where do I paste it in WordPress or Blogger?
In WordPress, use a Custom HTML block; in Blogger, switch to HTML view. Pasting into the visual editor shows the code as text instead of a link.
Does it handle non-English characters in URLs?
Yes, characters such as Arabic letters are kept as they are and modern browsers follow them correctly. For older platforms that struggle, encode the URL first with the URL Encoder.
Are my links saved?
No. Nothing is stored or transmitted; the result stays on the page until you close it.
Is it free?
Yes, free with no sign-up and no usage limit.
Last updated: