What is URL to Markdown?
URL to Markdown fetches one public web page and returns its main content as Markdown, together with the page title and the final URL. You give it a link to a documentation page, a blog post, a changelog or a policy, and you get plain text that a language model, a notes app or a static site generator reads directly.
Markdown keeps the parts of a page that carry meaning: heading levels, lists, links, emphasis, inline code and tables. HTML tags, scripts and styles are gone, so a model spends its context on the words of the page and you can split the text at its headings.
You ask
Convert the Python docs page for the json module to Markdown and keep the headings, links and code examples.
It runs
From your AI assistant over MCP or from your code over REST
You get
- Page
- Structure
- Links
- Inline formatting
- Tables and examples
- Give a coding agent current docsHand Claude Code or Cursor the reference page for the library version you use before it writes code against it.
- Build a retrieval corpusConvert the pages you trust, cut them at ## headings and index each chunk with its source URL.
- Quote a source exactlyPull the paragraph behind a claim in your brief and keep the link next to it for the fact check.
- Keep a dated text copySave a pricing page, terms page or changelog as Markdown today and compare it with next month's copy.
- Read the article, not the chromeGet the body of the page without the navigation bar, sidebar and footer around it.
What a web page to Markdown conversion returns
Each run returns one page. The response has three parts: the final URL, the page title and the Markdown body as a single string. Inside that string, these are the elements our test conversion kept.
Page
- Final page URL
- Page title, in its own field
- Flag that says whether a cached copy was served
Structure
- Headings with their levels
- Paragraphs
- Bulleted lists
- Horizontal rules between sections
Links
- Link text with its target
- Link titles from the original page
- Relative paths and in-page anchors as the site wrote them
- Full URLs to other sites
Inline formatting
- Bold and italic text
- Inline code in backticks
- Characters escaped so the Markdown renders correctly
Tables and examples
- Tables as Markdown pipe tables
- Code examples as plain lines
- Note and warning labels as plain text
The body covers one URL. To collect many pages of a site, list them with Website Mapper or read them in one job with Website Crawler. When you need a few named values such as prices rather than the whole text, use Extract Data from Website Pages.
Sample output from a Python docs page
The excerpt at the top of this page comes from a real run on 16 November 2026: the Python standard library page for the json module, converted with default settings and no selectors. The tool returned 33,586 characters of Markdown in 668 lines, plus the page title and URL. The summary on the left was counted from that text.
One result in full
What the run returned
- Page
- docs.python.org/3/library/json.html
- Page title
- Returned in its own field, not in the body
- Length
- 33,586 characters in 668 lines
- Headings
- 5 second-level, 6 third-level
- Links
- 155: 87 relative paths, 54 in-page anchors, 14 full URLs
- Lists and tables
- 31 list items, 2 pipe tables
- Code
- 44 interpreter prompt lines, no fenced blocks
- Images
- None on this page
- Cache
- Fresh fetch
What we found in the Markdown
All 11 section headings came through with their levels, 5 at ## and 6 at ###, and none of the site's navigation, sidebar or footer text did. The page title sits in its own field, so add it as an H1 if your files need one.
155 links kept their targets: 87 are relative paths such as ../glossary.html and 54 are anchors within the page. Resolve them against the page URL before you move the file somewhere else.
Code examples arrived as plain lines, 44 of them starting with an escaped >>> prompt, with no fenced code blocks. Indentation was lost in the pretty-printed JSON output and in the one example written without prompts. Wrap them in fences again if a model has to run them.
The docs site puts a ¶ permalink after every heading and definition, and all 35 of them stayed in the text. A single find-and-replace removes them before you index the file.
How to convert a URL to Markdown in your AI assistant
Add AI/ML API to your client
Click Try it now, choose Claude, ChatGPT, Cursor or another MCP client and add the server. You sign in with your AI/ML API account once.
Paste the link
Give the full URL and say what you want from the page: the whole text, one section or a quote.
Read the Markdown
Your assistant fetches the page and works from the converted text instead of guessing from its memory of the site.
Use it in the same chat
Ask for a summary of one section, a table rebuilt from the page, or a .md file named after the page title.
Prompts to start with
Use the AI/ML API MCP URL to Markdown tool. Convert https://docs.python.org/3/library/json.html to Markdown and keep the headings, links and code examples.
Use the AI/ML API MCP URL to Markdown tool. Fetch https://peps.python.org/pep-0008/ as Markdown and list every naming convention it recommends, with the heading each one sits under.
Use the AI/ML API MCP URL to Markdown tool. Read https://en.wikipedia.org/wiki/Markdown as Markdown and summarize the history section in five bullets with the years it mentions.
Use the AI/ML API MCP URL to Markdown tool. Convert https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429 to Markdown and quote the paragraph about the Retry-After header.
Settings that shape the Markdown
Only the URL is required. The other settings help on busy or script-heavy pages. In chat your assistant fills them in from what you ask; in code you pass them yourself.
| Setting | What it controls | Tip |
|---|---|---|
| Page URL | The full address of one public page, starting with https:// | Use the clean page address rather than a link with tracking parameters |
| Content selector | A CSS selector that keeps only one part of the page, such as article or main | Useful when a page mixes the article with long comment threads |
| Remove selector | CSS selectors for elements to drop before conversion, such as nav, footer or .ads | Separate several selectors with commas |
| Wait for selector | An element that must appear before the page is read | Set it for pages that load their text with JavaScript |
| Timeout | How long to wait for the page, from 1 to 60 seconds, 30 by default | Raise it for slow servers, lower it for batch jobs |
You rarely need selectors on documentation sites, which already separate the article from the navigation. News and shop pages benefit more: ask for “only the article” or “skip the reviews” and your assistant sets the selector.
Ways teams use web page Markdown
Current docs for coding agents
Give your agent the reference page of the exact library release you run, so the code it writes matches today's API.
HeadingsCodeLinks
Retrieval and RAG
Convert a reading list of trusted pages, split the Markdown at its headings and index each chunk with the source URL.
HeadingsURLTitle
Research briefs with quotes
Find the passage that supports a claim, quote it word for word and keep the link for whoever checks the brief.
ParagraphsURL
Change tracking
Store a dated Markdown copy of a pricing page, policy or changelog, then diff it against the next run to see what moved.
Full textTables
Content migration
Move posts from an old CMS into a docs site or Git repository that expects Markdown, keeping headings and links.
HeadingsLinksLists
Translation and editing
Hand a model the clean text of a page for translation or a style edit, then rebuild the page from the result.
ParagraphsInline formatting
URL to Markdown API for your code
In your code
REST · your AI/ML API key, JSON records back
The same tool runs over REST with your AI/ML API key. Send a URL and any selectors, and the JSON response carries the final URL, the page title and the Markdown body, ready to write to a .md file or cut into chunks for a vector store.
Use MCP when a person asks for pages in a chat, and REST when a job converts a list of URLs every night. Both run on one account and one balance. Start with the Toolbox REST quickstart, or add the server to your client with the MCP setup guide.
Other ways to turn a website into Markdown
Converting a page by hand is fine once. The choice changes when you convert pages every week or want your assistant to do it mid-conversation.
| Copy and paste from the browser | Online converter page | Your own script with an HTML-to-Markdown library | ||
|---|---|---|---|---|
| Setup | Connect once with your AI/ML API account | None, but formatting and links are often lost | Paste a URL into a web form | Fetching, parsing and cleanup code to maintain per site |
| Inside an AI chat | Yes. Over MCP | You paste it in yourself | No. No | Only if you build it |
| Best for | Pages your assistant or backend reads again and again | One short page, once | Occasional manual conversions | Engineering teams with a fixed list of sources |
Pricing
Pay as you goBilled per run from your AI/ML API balance
- No subscription
- No seat fee
- One balance for every tool
Each conversion is billed per run from your AI/ML API balance, with no subscription or seat fee. Our test conversion of the 33,586-character Python docs page cost less than one cent. Check the current price in your dashboard before you convert a long list of URLs.
FAQ
Is it legal to convert a web page to Markdown?
Reading a public page and keeping a copy for research or for a model's context is common practice. Copyright and the site's terms still apply to what you republish, so quote with attribution and ask a lawyer before you publish converted content at scale.
Can I convert a whole website to Markdown?
One run converts one URL. For a full site, list its pages with Website Mapper, then convert the ones you need, or read many pages in one job with Website Crawler.
Can I keep only the article and drop the rest?
Yes. Pass a content selector such as article or main to keep one part of the page, or a remove selector such as nav, footer to drop elements. In our test on the Python docs, the default result already left the navigation out.
How is this different from my assistant's built-in browsing?
Built-in browsing reads a page for one answer. URL to Markdown returns the converted text as data, so you can save it, count it, split it or pass it to the next step, and the same call works from your backend over REST.
Does it work in Claude, ChatGPT and Cursor?
Yes. Add the AI/ML API MCP server once and paste a link in plain English. Any client that supports MCP servers works the same way.
Can I save the result as a .md file?
Ask your assistant to write the Markdown to a file named after the page title. In code, write the body string from the REST response straight to disk.
Is the page fetched live?
Our test run was a fresh fetch. The response includes a flag that tells you whether a cached copy was served, so you can check freshness for each page.
What about pages that load their text with JavaScript?
Set a wait-for selector for an element that appears once the content has loaded, and raise the timeout if the site is slow. Pages behind a login are out of reach because the tool reads what a signed-out visitor sees.
Convert your first page
Connect once, then paste a public URL into your chat.