Skip to content
Free tool · runs in your browser

HTML link code generator

Fill in the address and the words, pick the options, and copy a clean <a href> tag — for a normal link, a new tab, an email address, a phone number, a download or a button.

Preview

The anatomy of an HTML link

<a href="https://menu.htmltourl.dev/" target="_blank" rel="noopener">See our menu</a>
  • <a> — the anchor element; everything between the tags is clickable.
  • href — where it goes: a web address, mailto:, tel:, sms: or #section.
  • target="_blank" — open in a new tab. Pair it with rel="noopener" so the new page cannot control yours.
  • rel="nofollow" — tells search engines not to pass ranking credit (use for paid or untrusted links; sponsored and ugc are more specific variants).
  • download — save the target instead of opening it (same-origin files only).

Links that work everywhere

  • Always include the protocol. href="www.example.com" is treated as a relative path and breaks; the generator adds https:// for you.
  • Phone numbers in international format. tel:+442071234567 dials correctly from any country.
  • Encode email subjects. Spaces and & in a mailto: subject must be percent-encoded — done automatically here, or by hand with the URL encoder.
  • Descriptive text. "See our menu" is better for screen readers and SEO than "click here".

Need a link to an HTML page you made?

A link needs a destination. If the page is still a file on your computer, publish it first with the HTML to link generator — you get a URL like https://menu.htmltourl.dev/ to put in the href.

Related guides

Frequently asked questions

What is the HTML code for a link?

<a href="https://example.com/">Link text</a>. Add target="_blank" rel="noopener" to open it in a new tab.

How do I make a link open in a new tab?

Add target="_blank", and rel="noopener" for safety. Tick Open in new tab above.

How do I make an email link in HTML?

<a href="mailto:you@example.com?subject=Hello">Email us</a>. Choose Email address as the link type.

Can a link look like a button?

Yes — tick Style as button. The generator adds inline CSS so it works even in emails and page builders that strip stylesheets.

More free tools

Paste HTML. Get a URL.

Code, an .html file, a ZIP or a whole folder becomes a live HTTPS URL with your own address, an optional password and a QR code. Free to start with Google sign-in; paid plans keep URLs online for good.

Convert HTML to URL