YouTube Embed Generator

Generate customized embed codes for YouTube videos for your website

YouTube Embed Generator

Create customized responsive YouTube embed codes with various options.

Enter YouTube Video URL
Enter any YouTube video URL or video ID
Start playing automatically (requires mute)
Start with video muted
Play video repeatedly
Display player controls
Show related videos when finished
Enable fullscreen button
min sec
Video will start at this timestamp
min sec
Video will end at this timestamp
Select the display aspect ratio
Select the player size
Uses youtube-nocookie.com domain. YouTube won't store visitor info until they play the video.
Preview

Enter a YouTube video URL and customize your embed options to get started.

Embed Code
Using This Embed Code

Copy and paste the code above into your HTML. The responsive code option includes CSS to maintain the aspect ratio at all screen sizes.

If you're using WordPress, you can simply paste the YouTube URL into your post editor rather than using this embed code.

How to use this tool
How to Use the YouTube Embed Generator

This tool helps you create customized embed codes for YouTube videos that you can add to your website. Follow these steps:

  1. Enter a YouTube video URL or video ID in the input field
  2. Customize the embed options according to your preferences
  3. Click the Generate Embed Code button
  4. Copy the generated HTML code and insert it into your website
Customization Options:
  • Player Size: Choose from preset dimensions or set custom width/height
  • Autoplay: Start playback automatically when the page loads
  • Start Time: Begin the video at a specific timestamp
  • Loop: Replay the video continuously
  • Controls: Show or hide player controls
  • Related Videos: Show or hide related videos when the video ends
  • Full Screen: Enable or disable the full screen button
  • Privacy Mode: Enable enhanced privacy mode (loads from youtube-nocookie.com)
Preview Features:
  • Live Preview: See how your embedded video will appear
  • Responsive Options: Generate code that works on all device sizes
  • Code Snippets: HTML, WordPress, and iframe code formats
Some websites may have restrictions on embedding videos or using certain parameters. Always test the embed code on your specific platform.