YouTube Embed Code Generator
Turn any YouTube link into ready-to-paste embed HTML, with custom options.
What is the YouTube Embed Code Generator?
This tool turns any YouTube link into a ready-to-paste <iframe> embed, with common options exposed as simple controls instead of requiring you to hand-edit query parameters: custom size, a specific start time, autoplay, hidden controls, and YouTube's privacy-enhanced embed domain.
How to use it
- Paste a YouTube video link.
- Adjust width, height, start time and the checkboxes as needed.
- Copy the generated code and paste it into your site's HTML.
What "privacy-enhanced mode" actually changes
Toggling this switches the embed domain from youtube.com to youtube-nocookie.com, YouTube's own official privacy-enhanced embed option. According to Google's documentation, using this domain means YouTube won't store cookies on a visitor's browser related to viewing preferences until they actually click play on the video — useful for sites that want to reduce third-party cookies set on page load, though YouTube may still set cookies once the visitor interacts with the player.
Want the "why" behind this tool? Read What "Privacy-Enhanced Mode" Actually Changes on a YouTube Embed.