Convert HTML Links and Images to Markdown Syntax

Convert HTML <a> anchor tags and <img> image tags to Markdown [text](url) and ![alt](src) syntax. Covers title attributes, linked images, and relative URLs.

Media & Links

Detailed Explanation

HTML Links and Images to Markdown

HTML anchor tags (<a>) and image tags (<img>) convert to Markdown's concise link and image syntax.

Link Conversion

<a href="https://github.com">Visit GitHub</a>

Converts to:

[Visit GitHub](https://github.com)

Links with Title Attribute

<a href="https://github.com" title="GitHub Homepage">Visit GitHub</a>

Converts to:

[Visit GitHub](https://github.com "GitHub Homepage")

Image Conversion

<img src="logo.png" alt="Company Logo">

Converts to:

![Company Logo](logo.png)

The alt attribute becomes the text inside [], and the src attribute becomes the URL inside ().

Image with Title

<img src="screenshot.png" alt="App Screenshot" title="Version 2.0">

Converts to:

![App Screenshot](screenshot.png "Version 2.0")

Linked Images

A common HTML pattern is wrapping an image inside a link:

<a href="https://example.com">
  <img src="banner.jpg" alt="Click here">
</a>

Converts to:

[![Click here](banner.jpg)](https://example.com)

Handling Missing Alt Text

If an <img> has no alt attribute, an empty alt is used:

![](image.png)

Good converters may warn about missing alt text since it affects accessibility.

Relative and Absolute URLs

URLs are preserved as-is during conversion. Relative paths like ./images/photo.jpg and absolute URLs like https://cdn.example.com/photo.jpg are both valid in Markdown. When migrating content between domains, you may need to update relative URLs after conversion.

Email Links

<a href="mailto:user@example.com">Email us</a>

Converts to:

[Email us](mailto:user@example.com)

Use Case

Link and image conversion is critical for any content migration. When moving web content to Markdown, preserving hyperlinks ensures navigation remains intact, and converting images with proper alt text maintains accessibility and SEO value.

Try It — HTML to Markdown

Open full tool