Logo

URL to Markdown Converter

Paste a page into a chat window and half your context goes on navigation and cookie notices. The model reads the menu instead of the article. This converter keeps the content, drops the furniture, and tells you exactly what it removed.

Why convert a webpage to markdown for llm work?

Because raw HTML wastes the budget you care about. Class names, wrapper divs and inline styles all consume tokens and none of them mean anything to a model.

Plain text solves the waste and creates a different problem. Strip everything and a heading becomes an ordinary sentence, a list becomes a paragraph, and the model has to infer structure you already had.

Markdown sits between the two. A ## costs two characters and tells the model a section started. A - marks a list item unambiguously. In our experience that trade — a handful of tokens for explicit structure — is the best value in the whole pipeline.

It also stores well. A markdown file is readable by a person, diffable in git, and ready for a retrieval system without another conversion step.

What gets stripped when you turn a website to markdown

Three passes, in order. Scripts, styles, iframes and forms go first, because they are never content.

Then the furniture: nav, header, footer and aside elements, plus any block whose class or id reads like navigation, sidebar, cookie banner, share widget or advert.

Finally, if the page marks up an article or main element, we take that and ignore the rest. A page that labels its own content is more reliable than any heuristic we could write.

Every converter does roughly this. The difference here is that we tell you what went. The amber panel after conversion lists each removal with a count, so when a section you wanted is missing you know immediately rather than re-reading the source to work out why. Turn off main content mode and it comes back.

The honest failure case: a site that names its article container something like promo-body will lose real content to the junk filter. Rare, but it happens, and the removal note is how you catch it.

How to keep output llm ready without wasting tokens

Turn links off first. On a documentation page or anything link-heavy, inline markdown links can account for a large share of the output, and a model cannot follow a URL anyway.

Images next. ![alt](https://very-long-cdn-url…) is a lot of characters for information the model cannot see. Keep them only when the alt text carries meaning you need.

Tables are the exception worth paying for. A markdown table keeps rows and columns aligned, and flattening one into prose reliably confuses a model about which value belongs to which heading.

The token counter is a guide, not a measurement. It divides characters by four, which is a rough English average — code and non-Latin scripts tokenise very differently. There is more on budgeting in keeping inside a token budget.

Where a markdown extractor online falls short

One limit matters more than the rest. We fetch the first HTML response and convert that. On a site that builds its content with JavaScript, that response is close to an empty shell.

You get an error saying so rather than a blank file, which at least tells you what happened. The reasons are covered in pages that render client-side.

Services like Jina Reader run a real browser to get around this. We have chosen not to. Rendering pages server-side is expensive per request and a much larger attack surface than a plain fetch, and we would rather be clear about the limit than quietly become a browser farm.

Sites can also refuse us outright. A 403 usually means the origin blocks requests that do not look like a browser session, which no converter routes around reliably.

Other ways into the same output

Already have the HTML? Skip the fetch entirely — our HTML to text converter strips tags from markup you already hold, and never touches a server.

Need the whole page rather than the article, including meta tags and images as separate groups? The website content extractor is the broader tool, with the same fetch behind it.

Writing markdown rather than extracting it, the README generator covers the structure most projects need.

Getting clean output from a URL to markdown converter

Convert with main content on, read the removal note, and only widen the net if something is missing. That order saves the most time.

Strip links and images when a model is the reader. Keep tables always. Check the token estimate before pasting rather than after your context fills up.

If you are publishing rather than consuming, the llms.txt convention is one attempt at pointing automated readers at markdown versions of your own pages — worth understanding, though adoption is far from settled.

Frequently Asked Questions

Why is markdown better than plain text for a model?

+
Because headings and lists carry meaning that plain text throws away. A model reading "## Pricing" knows a section started; reading an underlined line it has to guess. The markers cost a handful of tokens and buy back structure worth far more.

How accurate is the token estimate?

+
It divides characters by four, which is a rough English average and nothing more. Real tokenisers differ per model, and code or non-Latin scripts tokenise very differently. Use it to judge whether something fits a context window, never for billing.

The converter removed a section I needed. What now?

+
Turn off "Main content only" and convert again. That switch drops navigation, headers, footers and any block whose class or id looks like furniture — which occasionally catches real content on sites with unusual naming. The removal note tells you what went.

Why does it prefer the article element over the whole page?

+
A page that marks up its content properly is telling you where the content is, and that beats any heuristic we could write. When no article or main element exists we fall back to the whole body with the obvious furniture stripped.

Should I turn links off before feeding output to a model?

+
Usually yes. Inline markdown links can add a surprising share of the total tokens on a link-heavy page, and a model cannot follow them anyway. Keep them when you plan to read the output yourself or store it as a document.

Why do some code blocks lose their language tag?

+
We read it from a language- class on the code element, which is the common convention. Sites using a different attribute, or highlighting purely with inline styles, leave nothing to read. The code itself always survives.

Does this work on pages that build content with JavaScript?

+
No, and that is the honest limit. We fetch the first HTML response and convert it. On a client-rendered site that response is close to empty, so you get very little back. The error message says so rather than returning a blank file.

What happens to tables?

+
They become real markdown pipe tables, with rows padded so ragged tables stay valid. Nested tables used for layout produce poor results, but those are rare outside old email templates.

Is the output the same as what Jina Reader or similar APIs return?

+
Similar in shape, different in a few ways that matter. Those are APIs built for pipelines; this is a browser tool that shows you what it removed. Their rendering services also execute JavaScript, which we deliberately do not.

Can I convert several pages at once?

+
One at a time, by design. Bulk conversion turns this into a crawler, which is both a burden on the sites involved and a fast route to getting our address blocked. For a list of URLs, work through them individually.

Related Tools You Might Like

Advertisement