What does the YouTube custom embed generator do?
The YouTube custom video embed generator lets you set the playback, appearance and privacy options that YouTube supports for embedded videos, and produces the iframe code for you. For example, you may want to embed a YouTube video on an e-commerce product page without related videos from other channels showing when it finishes, or have a background video start muted and loop. Change the options above and the embed code and preview update instantly.
How to use the embed code
- Paste the video URL from YouTube (or just the 11-character video ID) into the first field.
- Choose the size and options you want. The preview shows exactly what visitors will see.
- Click Copy and paste the code into the HTML of your page, product description, or theme.
Want to embed videos hosted on Shopify instead of YouTube? Use the Shopify embed video code.
Notes on YouTube embed parameters
- modestbranding was retired by YouTube in 2023 and no longer hides the logo, so it is not offered here.
- Autoplay only works when the video is muted; the generator adds
mute=1automatically. - Loop requires the
playlistparameter set to the same video ID, which the generator handles for you. - Privacy-enhanced mode uses
youtube-nocookie.com, which is the recommended domain for sites that need to comply with cookie consent laws.
