Markdown Hyperlink Generator

Enter your text and URL, pick a link style, and copy hyperlink Markdown that renders correctly on GitHub, Discord, Obsidian and everywhere else. Nothing leaves your browser.

Free · No sign-up · Runs in your browserLast updated

How do you create a hyperlink in Markdown?

Put the visible text in square brackets and the destination in parentheses directly after it: `[link text](https://example.com)`. Nothing may sit between the closing bracket and the opening parenthesis. Add a quoted title inside the parentheses for a hover tooltip. The same pattern accepts relative paths, #anchors and mailto: addresses.

markdown
[MDUtil](https://mdutil.com)
[MDUtil](https://mdutil.com "Free Markdown tools")

Both lines render as a clickable link labelled MDUtil. The second also carries a title attribute, which most renderers show as a tooltip on hover.

Try the Markdown Hyperlink Generator

Settings

Output

Markdown hyperlink syntax explained

Markdown has four link forms plus a handful of platform-specific rules. They all compile to an <a> element, but they differ in where the URL lives and which renderers accept them.

Inline link (the standard form)

The everyday syntax: link text in square brackets, destination in parentheses, and an optional title in double quotes. A single space between the bracket and the parenthesis breaks it.

markdown
Read the [CommonMark spec](https://commonmark.org "CommonMark 0.31") before arguing about edge cases.

Renders a sentence in which “CommonMark spec” links to commonmark.org and shows “CommonMark 0.31” on hover.

Autolink and bare URLs

Angle brackets turn a raw URL into a link whose text is the URL itself. GitHub Flavored Markdown also auto-links bare URLs, but strict CommonMark does not, so the angle brackets are the portable choice.

markdown
<https://mdutil.com>
<[email protected]>

The first line links to https://mdutil.com and displays the URL as its own text. The second becomes a mailto: link without you typing mailto:.

Reference-style link

Move the URL out of the sentence and replace it with a short label defined elsewhere in the file, usually at the bottom. Long paragraphs stay readable and one definition can serve many links.

markdown
[CommonMark][spec] defines the syntax, and the [spec][] shortcut points at the same place.

[spec]: https://commonmark.org "CommonMark"

Both link texts resolve to commonmark.org. Labels are case-insensitive and the definition line never appears in the rendered output.

Anchor link to a heading

Link inside the same document with a fragment built from the heading: lowercase the text, swap spaces for hyphens and drop punctuation. GitHub, GitLab and most static site generators create these slugs for you.

markdown
Jump to [Quick Setup](#quick-setup), or to a section of another file with [requirements](./install.md#requirements).

The first link scrolls to the “Quick Setup” heading on the same page; the second opens install.md and scrolls to its “Requirements” heading.

Image links and formatted link text

An exclamation mark in front turns the link into an image, and nesting an image inside a link makes the image clickable — the pattern behind every README badge. Emphasis markers belong inside the brackets.

markdown
![MDUtil logo](/images/logo.png "MDUtil")
[![Build passing](https://img.shields.io/badge/build-passing-green)](https://ci.example.com)
[**Bold link text**](https://mdutil.com)

Line one shows an image with alt text, line two is a badge that links to the CI dashboard, and line three is a link whose text is bold.

Discord and chat-app hyperlinks

Discord calls the inline form a masked link and renders it in ordinary messages as well as bot and webhook embeds. Angle brackets have a second meaning there: they suppress the preview card. Slack does not parse Markdown links at all.

markdown
[Join the server](https://discord.gg/example)
<https://example.com>

In Discord the first line shows only “Join the server” as a clickable link; the second posts the plain URL with its preview embed suppressed.

Where Markdown hyperlinks work

Inline links are universal, but reference links, relative paths and heading anchors are handled differently from one platform to the next.

PlatformSupportNotes
GitHub / GitLabFullInline, reference, autolink and relative repo paths all work; heading anchors are generated automatically.
DiscordPartialMasked links [text](url) render in messages and embeds. Reference links do not work; <url> hides the preview.
SlackPartialThe composer ignores [text](url). Slack's own format is <https://example.com|text>.
ObsidianFullStandard Markdown links plus [[wiki links]] and ![[embeds]] for notes inside the vault.
NotionFullTyping [text](url) auto-converts, and pasting a URL onto selected text links it.
RedditFullInline and reference links both work in the Markdown editor on new and old Reddit.

How to create a hyperlink in Markdown

  1. Choose a link type

    Pick standard, automatic, reference or image depending on whether you need inline text, a bare URL, a reusable label or an embedded picture.

  2. Enter the text and URL

    Type the words readers should see, then paste the destination. Absolute URLs, relative paths, #anchors and mailto: addresses are all accepted.

  3. Add the optional extras

    Set a title to show a tooltip on hover, give reference links an ID, or switch on “open in new window” to add target and rel attributes to the HTML output.

  4. Copy the result

    Copy the generated Markdown, switch to the HTML tab if you need an <a> tag, and open the preview tab to confirm the link points where you expect.

Frequently Asked Questions

How do I create a hyperlink in Markdown?

Put the visible text in square brackets and the destination in parentheses immediately after it, like [Link text](https://example.com). There must be no space between the closing bracket and the opening parenthesis. To add a tooltip, place a quoted title inside the parentheses after the URL.

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

Markdown has no syntax for it. Use inline HTML instead: an <a> tag with target="_blank" and rel="noopener noreferrer". Some renderers, such as MkDocs or markdown-it with the attrs plugin, let you append {target=_blank} to a normal link. Platforms that sanitise HTML, including GitHub READMEs, strip the attribute.

What is the difference between standard and reference-style links?

They render identically. A standard link keeps the URL inline, which suits one-off links. A reference link puts a short label in the sentence and defines the URL elsewhere in the file, which keeps paragraphs readable and lets you update a URL used in ten places by editing a single line.

How do I link to a heading within the same document?

Use a fragment built from the heading text: lowercase it, replace spaces with hyphens and remove punctuation, so “Quick Setup” becomes [Quick Setup](#quick-setup). GitHub, GitLab and most static site generators create these anchors automatically, and duplicate headings get a numeric suffix such as #quick-setup-1.

How do I create an email link in Markdown?

Write a normal link with a mailto: URL, for example [Email support](mailto:[email protected]). You can prefill a subject with a query string such as mailto:[email protected]?subject=Bug%20report. Wrapping a bare address in angle brackets also produces a mailto link automatically.

How do I hyperlink in Discord?

Discord supports masked links: [Click here](https://example.com) shows only the words and hides the URL. They work in normal messages and in bot or webhook embeds, but reference-style links do not work. To post a URL without the large preview card, wrap it in angle brackets.

Can I use HTML for links inside Markdown?

Yes in most renderers. An <a> tag lets you set target, rel, class or id, which plain Markdown cannot express. The exceptions are platforms that sanitise or forbid HTML, such as Discord, Slack, Reddit comments and some static site configurations, where the tag is escaped or removed.

Why is my Markdown link not working?

The usual causes are a space between the closing bracket and the opening parenthesis, unencoded spaces or parentheses inside the URL, a missing scheme such as https://, or the link sitting inside a code block where formatting is ignored. Percent-encode spaces as %20, or wrap the URL in angle brackets inside the parentheses.

How do I link to another Markdown file in the same repository?

Use a relative path, for example [Installation](./docs/install.md). GitHub, GitLab and VS Code resolve relative links against the current file, so the link keeps working after the repository is cloned or the docs are moved together. Append a fragment such as ./docs/install.md#requirements to jump straight to a heading.

How do I make an image a clickable link?

Nest the image syntax inside a link: [![Alt text](image.png)](https://example.com). The outer brackets supply the destination and the inner exclamation-mark syntax supplies the image. This is how README badges link to build dashboards and package pages.