# How MarkItDown's YouTube Converter Works: From URL to Structured Markdown

> Discover how MarkItDown's YouTube converter transforms YouTube URLs into structured Markdown. Learn about metadata, descriptions, and transcript extraction using BeautifulSoup.

- Repository: [Microsoft/markitdown](https://github.com/microsoft/markitdown)
- Tags: internals
- Published: 2026-04-11

---

**MarkItDown's YouTube converter extracts video metadata, descriptions, and optional transcripts from YouTube HTML pages and converts them into clean Markdown using BeautifulSoup and the youtube-transcript-api library.**

The `microsoft/markitdown` repository includes a specialized **DocumentConverter** that transforms YouTube video pages into structured Markdown documents suitable for LLM processing. This converter handles URL validation, metadata extraction from both HTML tags and JavaScript variables, and optional transcript retrieval through a multi-phase pipeline.

## URL Detection and Acceptance Logic

The conversion process begins with the `accepts()`