YouTube Embed Code Generator
Create a clean, responsive embed code for any YouTube video. Set autoplay, mute, loop, start and end times, controls and privacy mode without coding.
YouTube Embed Code Generator
Customize and generate responsive, mobile-ready HTML iframe embed codes with privacy mode and playback controls.
Live Embed Preview & Code
Live Interactive Player Preview
HTML Iframe Snippet
<div style="position: relative; width: 100%; height: 0; padding-bottom: 56.25%; overflow: hidden; border-radius: 8px;">
<iframe
src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ"
title="YouTube video player"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen>
</iframe>
</div>How to Use the YouTube Embed Code Generator
Follow these simple steps to get started in seconds
- 1
Copy the YouTube Video URL
Copy the link of the YouTube video or Short you want to embed on your website.
- 2
Paste It into YT Crew
Paste the URL or video ID into the box above. YT Crew reads the video ID and shows a live preview.
- 3
Choose Your Embed Options
Turn on the responsive wrapper or set a fixed width and height, then choose autoplay, mute, loop, player controls, privacy-enhanced mode and optional start and end times.
- 4
Copy the Code to Your Site
Click 'Copy Embed Code' and paste it into WordPress, Webflow, Shopify, Squarespace or your own HTML.
About YouTube Embed Code Generator
Why YouTube's Default Embed Code Can Break Your Layout
Embedding videos in blog posts, landing pages and documentation is a great way to make a page more useful and keep readers engaged.
But YouTube's default embed code has a fixed size (width="560" height="315"). On phones and small screens, a fixed-size iframe can overflow the page and break your layout.
The YT Crew YouTube Embed Code Generator fixes this with a responsive wrapper that scales the video to any screen size. It works on WordPress, Next.js, Webflow, Shopify, Ghost and any site where you can add HTML.
YouTube Player Options Explained
YouTube's embedded player supports several settings, and YT Crew lets you set them without editing code:
- Responsive wrapper: Wraps the iframe in a container that keeps the video's shape while it scales to the page width.
- Start and end times (
start=X&end=Y): Show just one part of a long video, like a single tutorial step or a quote. - Autoplay and mute (
autoplay=1&mute=1): Useful for landing pages where a video should play silently in the background. Browsers generally only allow autoplay when the video is muted. - Hide controls (
controls=0): Hides the player controls for a cleaner look. - Loop (
loop=1&playlist=VIDEO_ID): Plays the video again when it ends. - Privacy-enhanced mode (
youtube-nocookie.com): YouTube doesn't store information about visitors unless they play the video. It is turned on by default in YT Crew.
How Embedded Videos Can Help Your Website
Adding a relevant YouTube video to an article can help both your site and your channel:
- More engaged readers: A good video gives readers another way to understand your topic and can keep them on the page longer.
- Video search results: Pages where a video is the main content can be eligible to appear in Google's video results, especially when the video is clearly related to the page.
- More views for your channel: When readers play your embedded video, those views count on YouTube too (autoplaying embeds don't count).
Questions About YouTube Embed Code Generator
How do I make a YouTube embed responsive on mobile?
YouTube's default embed code uses a fixed size (width 560, height 315), which can overflow small screens. With the responsive option, YT Crew wraps the iframe in a container that keeps the video's shape and scales it to the width of the page.
Can an embedded YouTube video autoplay with sound?
Usually not. Most browsers block videos from autoplaying with sound. Autoplay works reliably only when the video is muted, so turn on Mute together with Autoplay.
How do I embed a YouTube video that starts at a specific time?
Enter the start time in seconds (for example 135 for 2:15). YT Crew adds start=135 to the embed URL. You can also set an end time the same way.
Do views from embedded videos count on YouTube?
Yes. Views from YouTube's embedded player on other websites count toward the video's views when a viewer starts the video. YouTube doesn't count views from embeds that autoplay, so autoplay embeds won't add to your view count.
What is privacy-enhanced mode (youtube-nocookie.com)?
It's a YouTube embed option that uses the youtube-nocookie.com domain. YouTube says it doesn't store information about your visitors unless they play the video. It can help with privacy requirements, but it isn't a full privacy compliance solution on its own.
By Waris Jamil · Last updated 26 October 2026
YT Crew is an independent site, not affiliated with YouTube or Google. Disclaimer
Related YouTube Creator Tools
More free tools to help you produce and optimize YouTube content
Related YouTube Growth Guides
Playbooks that put this tool to work

How to Start a YouTube Channel in 2027 (A Practical Guide)
Learn how to start a YouTube channel step by step: pick a niche, set up on PC or phone, make your first video, and start making money, even with no budget.
Read guide
How to Check YouTube Monetization Status (Phone & PC, 2026)
Check your YouTube monetization status in YouTube Studio on PC or phone. See what each video icon means, track eligibility, and find your earnings.
Read guide
Best YouTube SEO Tools in 2026: Free and Paid Picks
Find the best YouTube SEO tools for keyword research, tags, analytics, and title testing. Compare free YouTube tools with vidIQ, TubeBuddy, and AI picks.
Read guide