YouTube embed code builder
Generate responsive embed markup with supported playback settings.
Your inputs
Your results
Ready when you areYour results will appear here.
How it works
Generate responsive 16:9 iframe markup with an accessible title, supported start/end, controls and caption settings. Deprecated branding parameters are omitted.
Read the source reference ↗A few things to know
Embedding must be allowed by the video owner. A player requires at least a 200 × 200 viewport. Privacy-enhanced mode is not a promise of zero tracking; no video is loaded here.
When to use this tool
Build copyable responsive markup using supported player parameters. The iframe title describes the embedded content to assistive technology.
- Embed a lesson.
- Add a demonstration to a guide.
- Prepare accessible iframe markup.
How to use youtube embed code builder
Prepare the inputs
Enter a video URL or ID and a descriptive iframe title.
Choose the settings
Choose timing, controls and caption preference.
Review and export
Copy the markup into your site and check it at mobile width.
Try the supplied example
Inputs
video: M7lc1UVf-VE; start: 0; end: 0; controls: Show; captions: Default; privacy: Privacy-enhanced; title: Video demonstration
Result
The example produces a lazy-loaded, privacy-enhanced iframe with controls.
What it means
Test the markup on your own page, particularly in narrow containers.
Common mistakes to avoid
Do not assume embedding is allowed for every video
Do not assume embedding is allowed for every video.
Privacy-enhanced does not mean no third-party requests
Privacy-enhanced does not mean no third-party requests.
Frequently asked questions
Definitions, edge cases, and practical next steps for this tool. Search all tool FAQs ↗
Does this load a video here?
No. The output is copyable HTML text and a download.
What does privacy-enhanced mean?
The iframe uses youtube-nocookie.com; YouTube still receives requests when the player is loaded.
Why no modestbranding switch?
That parameter is deprecated and no longer provides the advertised control.
Can I choose an end time?
Yes, a positive end time must be greater than the start and is measured from the video’s beginning.
Will captions always appear?
Only if captions are available and the player honors the caption preference.
What minimum size should I use?
YouTube documents a minimum 200 × 200 player viewport; check controls fit too.
Are my inputs uploaded or stored?
Processing happens locally in your browser. This tool does not upload inputs. Downloads stay on your device; sharing or opening them in another service is your choice.
What should I check before using the output?
Embedding must be allowed by the video owner. A player requires at least a 200 × 200 viewport. Privacy-enhanced mode is not a promise of zero tracking; no video is loaded here.
Explore the topic in the blog
Sources and method
Use the references below to check definitions and platform guidance. The model’s scope and limits are explained above. Read our editorial standards.