Links in Markdown
Put the link text in square brackets and the address in parentheses: [text](https://example.com). This guide covers every link form, links to headings and files, and how chat apps handle them.
Quick answer
How do you add a hyperlink in Markdown?
Write the link text in square brackets followed by the address in parentheses, with no space between them: [Example](https://example.com). Add a title in quotes after the address to show it on hover, and wrap a bare address in angle brackets, <https://example.com>, to link it as it is.
[Example](https://example.com)
<https://example.com>Result
Link syntax and examples
All of these produce an ordinary <a> link; they differ in how the address is written.
Link with a title
Text in quotes after the address becomes the link's title, which browsers show on hover.
[Example](https://example.com "Shown on hover")Result
Automatic links
An address in angle brackets becomes a link to itself. GitHub Flavored Markdown also links bare https:// and www. addresses, and email addresses in angle brackets.
<https://example.com>
https://example.com
<[email protected]>Reference links
Give the address a label and define it anywhere in the document. Long URLs stay out of the paragraph, and several links can share one address.
Read the [style guide][style] and the [FAQ][].
[style]: https://example.com/style
[FAQ]: https://example.com/faqResult
Read the style guide and the FAQ.
Links to headings
Use # and the heading's id. Most renderers build the id from the heading text in lowercase, with spaces turned into hyphens.
[Jump to Installation](#installation)Result
Addresses with spaces or parentheses
Wrap an address that contains spaces in angle brackets. Balanced parentheses can stay as they are.
[The report](<https://example.com/annual report.pdf>)
[Disambiguation](https://en.wikipedia.org/wiki/Markdown_(disambiguation))Result
Links in popular apps
[text](url) works almost everywhere. Chat apps are the exception.
| App | Support | Notes |
|---|---|---|
| GitHub / GitLab | Supported | Every link form works; bare URLs become links and headings get ids for # links. |
| Discord | Differs | [text](https://…) works in messages, and bare URLs become links. |
| Slack | Differs | [text](url) works once "Format messages with markup" is on under Preferences → Advanced; otherwise use the link button. |
| Obsidian | Supported | Markdown links work, and [[Note name]] links to another note. |
| Supported | [text](url) works, and bare URLs become links. |
Questions and answers
Why is my Markdown link not working?
] and (, for spaces in the address (wrap it in < >), and for a missing https://, without which the address counts as a path on the current site.How do I link to a heading on the same page?
# and the heading's id: [Install](#installation). On GitHub the id is the heading text in lowercase, with spaces turned into hyphens and most punctuation removed.How do I add a hyperlink in Discord?
[text](https://example.com) in a message. Discord shows the text as a link.Can a Markdown link open in a new tab?
<a href="https://example.com" target="_blank">text</a>. Sites that clean HTML may remove target.What is the difference between inline and reference links?
How do I link to another Markdown file?
[Guide](docs/guide.md). GitHub and most site generators open that file's page.How do I make an email link?
<[email protected]>, or write [Email us](mailto:[email protected]).How do I show brackets without making a link?
\[not a link](https://example.com).