Quick Reference
Inline Link Syntax
[Link text](https://example.com)
Result
Automatic URL Detection
Many Markdown parsers automatically detect URLs and convert them to clickable links. You can also wrap URLs in angle brackets to ensure they're converted to links.
Example 1: Automatic URL Detection
Markdown:
https://www.example.com http://example.com www.example.com
Example 2: Angle Bracket URLs
Markdown:
<https://www.example.com> <mailto:user@example.com> <ftp://files.example.com>
Inline Link Syntax
Basic Inline Links
Create links with custom text using square brackets for the text and parentheses for the URL:
Markdown:
[Visit Google](https://www.google.com) [GitHub](https://github.com) [Contact Us](mailto:hello@example.com)
Output:
Links with Titles
Add tooltip text by including a title in quotes after the URL:
Markdown:
[Google](https://www.google.com "Search Engine") [GitHub](https://github.com "Code Repository") [Stack Overflow](https://stackoverflow.com "Q&A for Developers")
Output:
Links with Relative URLs
Use relative URLs for internal links within your site:
Markdown:
[Home Page](/) [About Us](/about) [Contact](/contact.html) [../README.md](../README.md)
Reference Links
Reference links allow you to define URLs separately from the text, making your Markdown more readable and maintainable.
Basic Reference Links
Markdown:
Here's a link to [Google][1] and [GitHub][2]. You can also use [Google][google] with named references. [1]: https://www.google.com [2]: https://github.com [google]: https://www.google.com "Google Search"
Special URL Types
Email Links
Markdown:
<user@example.com> [Email Us](mailto:support@example.com) [Email with Subject](mailto:hello@example.com?subject=Hello)
Telephone Links
Markdown:
[Call Us](tel:+1234567890) [International](tel:+44-20-7946-0958) [Toll Free](tel:1-800-555-0199)
File and Protocol Links
Markdown:
[Download File](file:///path/to/file.pdf) [FTP Site](ftp://files.example.com) [Secure FTP](sftp://secure.example.com) [SSH Connection](ssh://user@server.com)
Best Practices
✅ Do This
- Use descriptive link text: "Download the user manual" instead of "Click here"
- Include protocols: Use "https://" for external links
- Add titles for tooltips: Provide additional context with title attributes
- Use reference links: For better readability in long documents
- Test your links: Verify URLs work before publishing
❌ Avoid This
- Generic link text: "Click here", "Read more", "Link"
- Broken URLs: Always verify links work
- Missing protocols: "www.example.com" might not work everywhere
- Overly long URLs: Use reference links for very long URLs
Common Issues and Solutions
❌ Problem: Special Characters in URLs
Problematic:
[Search](https://example.com/search?q=hello world)
Better:
[Search](https://example.com/search?q=hello%20world)
URL-encode special characters, especially spaces (%20).
❌ Problem: Parentheses in URLs
Problematic:
[Wikipedia](https://en.wikipedia.org/wiki/Markdown_(markup_language))
Solution:
[Wikipedia](https://en.wikipedia.org/wiki/Markdown_%28markup_language%29)
Escape parentheses in URLs with %28 and %29.
Try URL Formatting Yourself!
Practice URL and link syntax with our free online converter.