How to use reference-style links in markdown to separate URL definitions from link text. Cleaner source for URL-heavy documents.
Reference-style links separate the link text from the URL by using a label. The link text uses [text][label] and the URL is defined elsewhere with [label]: url. This keeps long URLs out of the flow of prose, making the source markdown easier to read and maintain.
| Platform | Supported | Notes |
|---|---|---|
| GitHub | Yes | — |
| GitLab | Yes | — |
| Obsidian | Yes | — |
| Discord | No | — |
| Notion | No | — |
| Slack | No | — |
[text][label] without defining [label]:
Define all labels at the bottom: [label]: url
Undefined reference labels render as literal text with the brackets intact, not as a link.
Placing all [label]: url definitions at the end of the document keeps them organized and makes the prose readable.
If you link to the same URL multiple times, define it once as a reference and use the label throughout. One update changes all instances.
Everything you need to know.
A reference link separates the URL from the link text. You write [text][label] in your prose and [label]: url somewhere else in the file. The link renders identically to an inline link.
Links in markdown use square brackets for the display text and parentheses for the URL: [text](url). You can also add hover titles, use reference-style links for cleaner source, and auto-link bare URLs on most platforms.
Auto-links turn plain URLs and email addresses into clickable hyperlinks without needing to write full link syntax. Angle brackets (<url>) create explicit auto-links. GitHub Flavored Markdown also auto-links bare URLs (without angle brackets) when they begin with http:// or https://.
Markdown has no dedicated syntax for clickable images, but you can achieve it by nesting image syntax inside link syntax: [](link-url). The image becomes the visual element of the link. This technique is widely used for badges, logo links, and banner images.
Paste your markdown and see reference link rendered instantly with professional themes.