Markdown Link Flattener

Turn `[label](url)` links into plain labels, `label (url)` citations, or URL-only lists. Images, reference definitions and code blocks have explicit controls, and everything runs locally in your browser.

Try:
Flattened Markdown

About this tool

Markdown links are great while you are editing, but they get in the way when the text is headed to plain email, a CMS field, a spreadsheet, an LLM prompt, or a legal/redline review that should show the visible words instead of link syntax. This tool flattens inline Markdown links in place: [the docs](https://example.com/docs) can become the docs, the docs (https://example.com/docs), or just https://example.com/docs.

The surrounding text stays in the same order. Code spans and fenced code blocks are preserved by default, so README examples that intentionally show Markdown syntax are not rewritten by accident. Images and reference definition lines have their own controls because teams disagree on whether ![alt](image.png) should become alt text, a citation, nothing at all, or stay as image syntax.

Worked example

Input:

Read [the docs](https://example.com/docs) and see ![diagram](diagram.png).

[old-ref]: https://example.com/old

`[example](kept)`

With the default settings, the output is:

Read the docs and see diagram.



`[example](kept)`

Switch Inline links become to Text with URL and the first sentence becomes Read the docs (https://example.com/docs) and see diagram.. Switch Images become to Keep image Markdown and the image syntax stays untouched while normal links are still flattened.

What it handles

Limits and edge cases

FAQ

Will it remove the visible link text?

Only if you choose URL only. The default keeps the visible label, so [docs](https://example.com) becomes docs. The Text with URL mode keeps both pieces as docs (https://example.com), which is often the safest format for plain email or review notes.

What happens to images?

Images are controlled separately from normal links. By default ![diagram](diagram.png) becomes diagram, because alt text is the closest plain-text replacement. You can instead write diagram (diagram.png), remove images entirely, or keep the original image Markdown unchanged.

Does it change links inside code examples?

Not by default. Backtick code spans and fenced code blocks are copied through unchanged, so a README example like `[x](y)` remains an example. Turn Preserve code spans and fenced code blocks off only when you intentionally want to flatten every link-looking string in the document.

Can it resolve reference-style links?

It can drop or keep reference definition lines like [docs]: https://example.com, but it does not rewrite [the docs][docs] to the docs (https://example.com). Resolving references correctly needs a fuller Markdown document model. This tool keeps that use visible rather than silently guessing.

Are URLs checked or fetched?

No. Destinations are treated as text. The tool does not follow redirects, validate domains, download images, or contact the network, which keeps it deterministic and safe for drafts that contain private URLs.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool markdown-link-flattener 'Read [the docs](https://example.com/docs) and see ![diagram](diagram.png).

[old-ref]: https://example.com/old

`[example](kept)`'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/markdown-link-flattener/?markdown=Read%20%5Bthe%20docs%5D%28https%3A%2F%2Fexample.com%2Fdocs%29%20and%20see%20%21%5Bdiagram%5D%28diagram.png%29.%0A%0A%5Bold-ref%5D%3A%20https%3A%2F%2Fexample.com%2Fold%0A%0A%60%5Bexample%5D%28kept%29%60&link_mode=text&image_mode=alt_text&reference_definitions=drop&preserve_code=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.