YouTube Embed Code Options – Autoplay On or Off
Posted on 26. Sep, 2008 by Brian Wong in Social Media
Here are some problems I face when embedding YouTube videos on my website.
First, the user has to click on the “play” button for the video to play. People who are new to online video might not even know to how to do that.

Second, at the end of the video, the “related videos” pop up taking your visitor to other sites. In other words, off your site!

So have you ever wanted your embedded YouTube video to automatically play (autoplay) when your page loads? How about turning off the “related video” feature at the end the video?
You’ve come to the right place. After much experimenting, here are all the YouTube embed code variations to get your video just the way you want it. Just replace the video URL with the video you want to embed:
Default YouTube Embed Code:
<object width=”425″ height=”355″><param name=”movie” value=”http://www.youtube.com/v/EBM854BTGL0&autoplay=1″></param><param name=”wmode” value=”transparent”></param><embed src=”http://www.youtube.com/v/EBM854BTGL0&rel=1&border=0″ type=”application/x-shockwave-flash” wmode=”transparent”width=”425″ height=”344″></embed></object>
Code to Autoplay a YouTube Movie:
<embed src=”http://www.youtube.com/v/EBM854BTGL0&autoplay=1″ type=”application/x-shockwave-flash” wmode=”transparent” width=”425″ height=”344″></embed>
Code to turn off RELATED MOVIES at the end of the movie
<embed src=”http://www.youtube.com/v/EBM854BTGL0&rel=0&border=0″ width=”425″ height=”344″ type=”application/x-shockwave-flash” wmode=”transparent”></embed>
Code to Autoplay YouTube Movie AND turn OFF related movies at the end of the movie:
<embed src=”http://www.youtube.com/v/EBM854BTGL0&autoplay=1&rel=0″ type=”application/x-shockwave-flash” wmode=”transparent” width=”425″ height=”344″></embed>
Want to see what it looks like? Click on the image below to see a live example of the codes in action.

Click on this link to get the codes and view the live example.
Enjoy.
What’s Next?
How about creating custom YouTube backgrounds to brand yourself? Check out the matching themes I use for my blog, Twitter, Facebook Fan Page and YouTube Channel at PersonalBrandingThemes.com











71 Comments
Joe Shibata Corrigan
28. Sep, 2008
thanks mate. I was thinking about a solution yesterday!
Law of attraction strikes again…
Brian Wong
30. Sep, 2008
Glad to be of service. :)
Paul Loudon
03. Dec, 2008
Hi There,
my autoplay won’t work the added code: “&autoplay=1″ keeps being replaced by: “-50&autoplay=1″ when the page refreshes.
The entire thing is below (yes I want the the music from Conan to play automatically on the page) Thanks for any help:
Brian Wong
04. Dec, 2008
Hi Paul,
As you can see, the codes are working fine here: http://brianwong.com/blog/other/youtube-embed-codes.htm
Its very likely that you will need to edit the page in a better html editor that does not replace your code with different characters.
Vicky
03. Jan, 2009
COOLNESS!! Thanks, I’ve ALWAYS wanted to be able to do that.
Do you know HOW to turn the sound OFF in a flash video, by any chance?
I want to post some flash video animations I’ve created, that autoplay, in a group at my page, but its getting very annoying to have the sound playing on all of them, all at once.
Thanks so mmuch if, you know how to do that, and can let me know…
XOX Vicky
Items of interest » Blog Archive » Bookmarks for December 31st through February 22nd
22. Feb, 2009
[...] YouTube Embed Code Options – Autoplay On or Off | Web 2.0 Marketing – [...]
shane anciso
19. Apr, 2009
Informative article Brian, just what I was needing, thanks!
-Shane Anciso of the Shane Network
Hardric Demsley
20. Apr, 2009
Thanks a bunch for sharing this! You’ve saved me a lot of time poking around on my own.
Regards, Hardric Demsley, Barely B Films
Jim Stiner
16. Jul, 2009
I was able to make autoplay work by replacing en=1 with rel&autoplay=1, but I could not understand what I need to do to turn off the thumbnails.
Do I copy the code you have displayed and paste inside the orginal embed or after the orginal embed?
Puzzeled in Kansas City.
Jim
Brian Wong
17. Jul, 2009
Hi Jim, Since I posted this article, YouTube has updated their embed code. You can now turn off the “related video” thumbnails directly from YouTube. Just click on the customize icon next to the embed code and turn off the related videos option. :)
valerie
18. Dec, 2009
I finally googled “youtube embed options” with a frustration mind and an aching heart today and happily this popped up #2. Thanks dude. Cured what ailed me in about 60 seconds. Yer made of WIN!
Brian Wong
18. Dec, 2009
Yer welcome Valerie! Glad to be of service! :)
Deepak
23. Apr, 2010
Hi i want to remove the play and pause control from you tube video how can i do this
Matt Sky
14. Jun, 2010
I think the autoplay will get you more views ultimately, but sometimes does annoy repeat visitors.
v_blayne
23. Aug, 2010
Brian ..but the code for sound “off ” can u tell us ?
fazi
25. Aug, 2010
hey thankz a lot!!!
Frankie
28. Aug, 2010
Is there any way of including the autoplay code in the url copied from the address bar, and not the embed code?
Thanks in advance
sandra
11. Oct, 2010
Hey thanks but my other question is
where did I put the &autoplay=”1″
in all the youtube videos when i have put this code
INCLUSIVE BORDER when it excitss.
And could I put autoplay o Iframe th enew Option on youtube??
Thank you for help
great rest sunday from germany
sandra
Aangiix3
23. Oct, 2010
What about on normal SWF´s. Is there a way to disable sound on an embed without clicking any button?
Sameeh
29. Oct, 2010
Hi,
1st, thank you for sharing this useful information, and I have made my video as scripted below:
But I have one question, if you please
how can I make the clip looping? (Play again / replay when its end)
I tried the valus [;&replay=0], actually I guess it (LooooL) but it didn’t work.
can anyone tell me how?
Sorry if this question repeated.
Rekha
13. Nov, 2010
This is a good feature I wasn’t aware of. Thanks. It does help when the video starts playing automatically rather than waiting for visitors to click Play button.
Ada Wong
22. Nov, 2010
Thanks for Brian to teach how to make the youtube.com emb. auto-play. How about after the movie and make it auto-replay?
Would you please let me know by email? Thanks Brian.
Autoplay Youtube Videos Suck | Small Business Planned
27. Nov, 2010
[...] Showing the world that you can code autoplay YouTube videos (Great article btw [...]
Dude
29. Dec, 2010
Great stuff.. however.
I have tried it for this video:
http://www.youtube.com/watch?v=614tEeDLsTg
But it really doesn’t work. The code seems to be different too.
been_been12
20. Jan, 2011
for youtube
add to the end of the link ?autoplay=1
randy
17. Feb, 2011
(Great Effort!)
Brian, how about for Playlist, do you know if possible to AutoPlay also?
Brandon Harshe, DC
08. Mar, 2011
Thanks a ton! You saved me big time!
Yam Thapa
13. Mar, 2011
Hi Brian Wong,i have embed the you tube play lis and post on my blog ,but there is no option to play full screen,i have tried to do so but can not,please advise,how to make it ,i am waiting for your positive and fast response.my blog url is:http://www.saugatsansar.net
(http://www.saugatsansar.net/search/label/Nepali%20Movies)
Thanks
Pandu
21. Mar, 2011
Great work Brain wong!
Just what I was looking for.
Is it posible to disable onclink on the video?
MILIO
14. Apr, 2011
HOW DO I MAKE A VIDEO AUTOPLAY ON MY FACEBOOK WALL?? DOES THAT WORK….?
igar
14. Apr, 2011
thank you Brian, very instructional!
civ
20. Apr, 2011
you’re codes wouldn’t work for me at first, which lead me to notice that something funky has happened with your double quotation marks. Replacing all ” with ” fixed the problem.
johnny martinez
01. May, 2011
hey Brian,
I have a lot of small video frames on one page, how do i get the videos to autoplay, i.e., jump from one video to the next and play, finally at the end of the page looping to the start video. thanks
Brian Wong
02. May, 2011
That’s not possible. I would recommend you group the videos into a single YouTube Playlist, then embed the playlist itself with the autoplay variable =”1″. But that would mean you would have only 1 video frame that continuously plays the videos one after the other.
Julia
06. May, 2011
Thank you for this :]
Elena
10. May, 2011
I too would be interested to know if there is a way to embed a video on a facebook page… so i can make it auto play.
Brian Wong
10. May, 2011
Hi Elena – that would be quite simple. You would need to install a “static page” app to your Facebook page (only applies to fan pages and not profile pages). Then just copy and paste the auto play code above. You can even get a different page for fans and non-fans to see. Take a look at my FB page here: http://facebook.brianwong.com
Jim
18. May, 2011
Brian, on the older embed codes the autoplay command works. I’m now seeing iframe coding from Youtube and the command isn’t working any more. Am I missing a step?
Thank you!
Jim
Theresa Hunt
18. Jun, 2011
Well I have embeded a youtube video in a iframe. But for some reason my items pop up under the video. Can some one help me on that here is my code.
Can some tell me what I am doing wrong?
Thanks Theresa
Nicolaa Eichelsheim
20. Jun, 2011
Thanks for posting this Brian. This is just what I’m looking for to help me.
Thanks
Nicolaas Eichelsheim
.
Theresa
24. Jun, 2011
I have embed youtube both ways and for some reason I am unable to stop things from going under the video. Can you help on this. By the way both iframe embed code and object code both works. My issue is the popping up under the video.
Can someone help me on this would greatly appreciate it.
Thanks
Theresa
edwoodt
25. Jun, 2011
anything posted on you tube that is copyright will have advertisement at the bottom of your video to compensate for the distribution royalties.
and if you don’t want anything at the end of your video, all you need to do is create a video title that is meaningless and also eliminate the “tag” words immediately when you start your upload.
utubetrain
30. Jun, 2011
Do you know how to turn the sound off?
John
03. Jul, 2011
Hi Brian,,
I cannot change the embed code for the video to autoplay when a person clicks to the channel. I think youtube may have changed since your original post. I have a promoted video with a Call to Action Overlay – if someone clicks the channel the video freezes at the start with just the CTAction. The url is http://youtu.be/lKanBEshsXM – can you help?
yuval
06. Jul, 2011
hi, i am using the auto play and now related movies at the end code and it works fine, is there a way to make the full screen option available?
Bryon Lape
07. Jul, 2011
This post is nearly 3 years old, yet it still works. Very nice. Thanks. Now to finish the rest of my page.
Mark
15. Jul, 2011
Brian:
What needs to be added to the code to center the embedded video on the page?
Thanks,
Mark
computer laptop gaming review
25. Jul, 2011
This alone does not work. (in my blog)
”http://www.youtube.com/v/EBM854BTGL0&autoplay=1&rel=0?
But this does work like a breeze with a tiny tweak.
”http://www.youtube.com/v/EBM854BTGL0&autoplay=1;&rel=0?
Notice the ( ; ) … and use the old embed code like above.
Thanks a lot man!
gelk
02. Aug, 2011
Awesome!! Thanks for the info. Do you know if there’s also a way to auto replay??
dwolfe
09. Aug, 2011
Hi Brian
Your blog is very helpful and informative. Thank You for producing it.
I am sure there is a simple answer to this but unfortunately, i just cannot find it. I have tried several options but to no avail. Is there a simple way to disable the link and object style information from showing on the end of a you tube video that is embedded into a website? It just looks bad. If there is not a way of doing this, can you suggest a workaround, even if it means hosting the video on the site? your suggestions would be very welcome.
Thanks in advance!
Bokca
16. Aug, 2011
Wow bro, I was looking for this for ages and now I got it working! Thanks a bunch man! Really like this share! Keep up the great work!
cathal butler
21. Aug, 2011
Hi Brian, thanks for all your tips they are very helpful. I have one question, having used your instructions I was able to turn on the auto play and turn off the related videos at the end, however I was wondering if there was any way to get the still frame at the end of the video to match the opening frame …thanks
Omar Lee
06. Sep, 2011
Hi Brian, Great article here. I was wondering if is there anyway we can disable double click that goes to youtube site.
Using the code below will not get you to youtube site when you double click it, it will just go fullscreen.
But using the code below, will get you to youtube if you double click it. (new default embed code)
The option i see with their difference was this:
http://www.youtube.com/embed/4rkHMxrj-p0 and
http://www.youtube.com/v/4rkHMxrj-p0
and you cannot add the option autoplay=1&hl=en&fs=1&rel=0 to this option
http://www.youtube.com/embed/4rkHMxrj-p0 to become
http://www.youtube.com/embed/4rkHMxrj-p0&hl&hl=en&fs=1&autoplay=1&hl=en&fs=1&rel=0
I just want to know how to add autoplay and turn off the related videos using this option
http://www.youtube.com/embed/4rkHMxrj-p0
or disable the double click command that goes to youtube site or just make it full screen instead of going to youtube site.
http://www.youtube.com/embed/4rkHMxrj-p0 to become
http://www.youtube.com/embed/4rkHMxrj-p0&hl&hl=en&fs=1&autoplay=1&hl=en&fs=1&rel=0
I wonder if there is an option like that. Sorry for my long comments. Just make sure my point is surely understood.
Thanks.
Omar Lee
06. Sep, 2011
Using the code below will not get you to youtube site when you double click it, it will just go fullscreen. (new default embed code)
But using the code below, will get you to youtube if you double click it.
Omar Lee
06. Sep, 2011
i thought i forgot to paste the code, but i just knew the code was disabled by wordpress
Sorry. my comment looks spam..coz it has become many comments.
ron
29. Sep, 2011
hey this code aint working any more wats going on
Remote Backup Business
14. Oct, 2011
This code doesn’t work anymore ;-(
Videos from YouTube added to your Blog Easily. | Linux Admins
16. Oct, 2011
[...] add [tube]Video URL from YouTube[/tube] BAM now you have Videos on your blog. I hope this helps!I was asked a question yesterday about adding Videos to a wordpress blog easily. This is really easy…now you have Videos on your blog. I hope this helps! WordPress › [...]
Ashley
27. Oct, 2011
You’re the man, thanks just what I was looking for.
Burhan
30. Oct, 2011
this old code doesnt work anymore. Actually, you will have to use the “?” instead of “&” for your first parameter only. If you use more than one parameter, you will then have to add “&” to the chain.
for any problem, just email me at burhangullu@hotmail.com
Beth
30. Oct, 2011
This is fantastic! Thank you. I’ve bookmarked it so I can just refer to this every time I post a video. So handy!
Bail Bond
14. Nov, 2011
Thanks Brian, I have been trying multiple codes for my website and none seem to work. I placed this code in and Viola! Working Great!
Thank You
Rudy
14. Nov, 2011
Since youtube has updated there embed code to an iframe now I was searching online to see how to make a playlist I made for my site to auto play when the page loads. Youtube doesn’t offer to much in the way of embedding options now. I came across this site when I was trying to figure out how to get it to auto play but this post has the old embed codes so I thought I would share how to get your videos or playlist to auto play since even on the youtube help section which was updated feb 2, 2011 I believe is not up to date with the new iframe code.
Eample of current iframe code (playlist):
After playing around with the “play in HD” check box option I notice a small bit of extra coded added to the end of the URL which was ” &hd=1 ” So I figured if I changed the [ &hd=1 ] to [ &autoplay=1 ] at the end of the URL it would make the video start by its self once the web page loaded which it did work :)
Example of current iframe code with auto play:
I have a live example of this on my website in the side bar of the site. Just click on my name to the left if you want to see how the video auto plays now. Also you can change the size of the video right in the script if the size options don’t work for you on youtube as they didn’t for me. Hope this helps anyone with the same problem I had cause I never did find the answer after search for over an hour online for such a simple option. :)
Rudy
14. Nov, 2011
Just thought since this post talks about how to make the old embed code loop I figured I would put the iframe code to make it loop as well.
Example with auto starting and looping:
added &autoplay=1&loop=1 at the end of the youtube URL
code [ ]
Cynthia
29. Nov, 2011
Very helpful! Thanks Brian!
Vincent Kernaghan
17. Dec, 2011
I spent hours trying different things until I found this page which helped me figure it out in 5 minutes. With the latest changes from YouTube, this is the code that works for me on both IE and Firefox. It gets inserted immediately after the URL, before the closing ”
?rel=0&frameborder=0&autoplay=1
Like Burhan points out earlier above, it now needs to start with the ? and use the & repeatedly. I did it with no spaces between the parameters.
The full code looks like this:
Thank you, thank you, thank you!
trevon
19. Dec, 2011
hi can i ask?
bout the play button then if you click the button there is embed video auto play…
something like this
http://www.dropbox.com/
hope you help me..
DeniE.
24. Dec, 2011
Hi Brian!
I was suffering with a video all day, until I found your site and quickly solved all my doubts. Thank you so much … I’m doing my first blog
http://thevirtualparadise.blogspot.com/
and you really helped me a lot. Saúdos!
libertytaken
29. Dec, 2011
Thanks Brian!!! This is very helpful. I applied it to my website called Liberty Taken – libertytaken.com. More helpful tips.
arief
09. Jan, 2012
thanks Brian!
old post but it help me much taking care my videos.
ed
24. Jan, 2012
thanks Brian! i had alot of problems with this this really helped me out alot
Leave a reply