YouTube embed options can make your videos look less YouTube-y

YouTube embed options Photo: Handicam Credit: Sanja Gjenero

Jim Dougherty

featured contributor

Update 12/13/14: A neat tool that will do some of this work for you automatically is this embed code generator: It doesn’t do everything, but it can make your embed stand out relative to the baseline embed code.

YouTube embed options are a great way to get a more professional look from your embedded videos.  The trick is to understand what codes to use and how to insert them into YouTube’s embed code. YouTube doesn’t make it so simple to do, though.  This is a short tutorial to go over some of my favorite options to personalize your embedded video.

YouTube embed options: how to find the basic embed code

Once you have a video hosted on YouTube that you want to embed on your site, you simply have to push “share” and “embed” to get the basic embed code (see the arrow in the illustration).

YouTube Embed Options

YouTube embed options: How to customize your embedded video

The key to this is to understand where to input the additional code and what your options are.  YouTube gives you a rundown of all of your options on their developer site. I’ll discuss a few popular ones at the beginning of the post and later will go through the litany of YouTube embed options with visual examples for each.

The “autoplay” function allows for a video to immediately start when a page loads.  (the value “1” enables this).  To insert this into the embed code, you would simply use the “?” character and then “autoplay=1″

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>iframe>

The “controls” function allows you to hide or show the video controls.  To hide the controls, I insert the character “&” and then “controls=0″ immediately after the last code entered.

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>iframe>

The “showinfo” code shows and hides the YouTube header bar.  To hide the info bar, I insert the character “&” and “showinfo=0″

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>iframe>

Finally, in order to remove related videos from the end of the video I insert “&” then “rel=0″ like this:

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>iframe>

What does each YouTube embed parameter look like?

To take this post a step further, I thought it might be helpful to go through each of the embed options and visually show what each addition would do. For your reference, you can find a definitive list of parameters that you can control for an embedded  YouTube video: It’s important to note that there are settings specific to Flash players (you can get these embed codes by checking the box for “get old embed code” when getting the embed code for any specific YouTube video), and HTML5. For the purposes of this post, all embed codes are HTML5 compliant (mobile devices won’t display Flash making HTML5 a better solution for most purposes).

So I’m going to use the Rick Astley “Never Gonna Give You Up” video (aka the “Rick Roll”) as our example video. So, here is the default embed from YouTube:

***Update 4/30/2014 – since Rick Astley has evidently take down his video from YouTube, I substituted his video with a video of professional wrestler Stone Cold Stone Austin lip-syncing to the song. It’s not the original but it will do.

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>


Now we’ll add “autohide.” Autohide has three values, “2” which is the default and video progress bar to fade out while the player controls remain visible, “1” which hides the progress bar and player controls after a few seconds, and “0” which will keep the progress bar and player controls visible always. In this embed, the autohide value is set to “1.” The difference may or may not be especially distinguishable.

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>iframe>


I discuss autoplay above and for the sake of your sanity I have omitted an example of this. Trust me, it works.


This allows you to turn closed captions on, even if the user has them turned off by default. The “0” value turns closed-captions off, and the “1” value turns closed-captions on. (For this example we’ll use a different video since Rick Astley’s video is disappointingly not closed captioned)

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>iframe>


The color parameter dictates the color that the progress bar shows on the video. There are two parameters to choose from: “red” and “white.” Red is the default, so here is an example of the “white” parameter:

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>


The controls parameter determines when the controls will display. The “0” setting will prevent controls from showing, the “1” setting is the default and shows controls, and the “2” setting is the same as “1” except that Flash isn’t loaded until the player plays. Here is an example of the “0” setting:

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>iframe>


The disablekb parameter will disable the keyboard controls. This parameter value is “0” by default, but can be changed to “1” to disable the keyboard controls.

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen>

I haven’t included an embed option as it doesn’t do anything visually to the video. Incidentally, YouTube keyboard controls are as follows:

Spacebar:  Play / Pause
Arrow Left:  Jump back 10% in the current video
Arrow Right:  Jump ahead 10% in the current video
Arrow Up:  Volume up
Arrow Down:  Volume Down


The enablejsapi allows you to enable the Javascript API to control the YouTube player. If you need this parameter (which is “1” to enable and “0” by default incidentally), stop reading this post – you probably don’t need it. :)


The “end” parameter enables you to determine a duration (in seconds) that your video will play and then conclude. Note that the time is from the beginning of the video and not from the complementary “start” parameter that I’ll discuss in a moment. Note that YouTube says this doesn’t work for HTML5, but it appears to be working in this two-second example:

<iframe src="" height="480" width="640" allowfullscreen="" frameborder="0"></iframe>


The fs (fullscreen) parameter is another embed parameter that doesn’t work with HTML5. It allows you to hide the fullscreen button. It is set to “1” (display) by default, but can be set to “0.”


The parameter “iv_load_policy” determines whether or not video annotations will be shown. There are two values: “1” and “3,” where “1” (the default setting) shows video annotations and “3” does not. Fortunately, the Astley video has some annotations so you can see the difference between the two. Here is an example where video annotations aren’t shown:

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen></iframe>

list and listType

List and listType are Flash-specific commands to determine and control a video playlist. Because the “playlist” command works for HTML5 as well, it’s probably a better tactic to use that parameter to create a playlist so I’ll skip over these.


This setting allows you to set your video to repeat ad infinitum. The “0” value is the default (stop at the end) value, and the “1” value will create a loop. For giggles, I’ll embed the Astley video with loop enabled (though I hope nobody will need to watch it a bunch to find it helpful :) ). You’ll note in the code that in order to make “loop” work it should be used in conjunction with the “playlist” attribute.

<iframe width="640" height="480" src="//" frameborder="0" allowfullscreen></iframe>


The modestbranding setting allows you to show your videos without the YouTube logo showing. You’ll notice that the YouTube logo goes away but it’s not as incognito as you might imagine. In any event, the value to turn on “modest branding” is “1.”

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen></iframe>

origin and playerapiid

These two functions are used in conjunction with the Javascript enable. Since I don’t know too much about this aspect of YouTube embeds I’ll skip these for now.


The playlist function allows you to play a prescribed list of sequential YouTube videos in your embed. It’s pretty simple to use, after the playlist command you list the IDs of the videos that comprise your list each separated by a comma (note that if you mention the first embedded video in the list it will play twice). This is a video list of Rick Astley videos – if you watch carefully you may come to the same conclusion that I have that he was Robin Thicke before Robin Thicke was Robin Thicke…. but I suppose that’s an ad sequitur to the embed option post:

<iframe width=”640″ height=”480″ src=”,lq2zHpcLBXI,MkYGDzO_2hs,WepArag_IUc" height="480" width="640" allowfullscreen="" frameborder="0">


The “rel” parameter determines whether you want to show related videos at the end of your video or playlist. The default is “1” for yes, and conversely the value of “0” will prevent related videos from being shown at the end of the embedded video. Here is an example:

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen></iframe>


The showinfo parameter determines whether the video information is presented before the video is played. The “1” value is default, and “0” value hides the video information as such:

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen></iframe>


The start parameter determines the spot where the video will begin playing (measured in seconds from the beginning of the video). Recall that this can be used in concert with the “end” function, but both parameters are measured in seconds from the beginning of the video. Here is an embed of the Rock Astley video where a bartender does a backflip (102 seconds in):

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen></iframe>


The theme parameter allows you to choose either a dark or light theme for your embedded video player. The “dark” value is default, and here is an example of the “light” value:

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen></iframe>

Putting it all together

So, I thought it might make sense to put some of these parameters together to show how they work in concert. In this example I hid the video information, hid the notes throughout the video and hid the video controls. Note that these parameters don’t work well with the modestbranding parameter so I couldn’t include it. The result is a very clean looking embed and optimal viewing experience for fans of Rick Astley:

<iframe width="640" height="480" src="" frameborder="0" allowfullscreen></iframe>

If you have anything to add, please feel welcome leave a comment. And if this was of use to you, please take a moment to share this with others on your social networks. Happy embedding!

Jim Dougherty

Jim Dougherty

Writer and chief of miscellany at
I'm the guy that wrote the article you just read. Sorry for the typos.
  • Ben Baker

    Jim, great helpful information, thanks. Ben

    • jimdougherty

      Thanks Ben and appreciate you sharing this on LinkedIn as well! Cheers!

  • Carolyn Nicander Mohr

    This is great information, Jim. I have to say though that I really, really don’t like it when I open a page and a video starts to play. I like very much being able to delete the related videos at the end of a YouTube video!

    • jimdougherty

      Thanks Carolyn! I understand how that can be off-putting, but the rationale for autoplay (in my mind) is to give a message or a snippet of a message before a person can arbitrarily opt out. I think that’s a powerful and useful tool to give content the highest likelihood of being noticed. Thanks so much for reading and commenting!

      • bitkahuna

        auto playing video is a huge no-no. if someone’s in an office cube and a site they go to starts blaring a video that they didn’t ask to play, it’s obnoxious and could even get someone fired. it ‘seems’ like a good or ‘powerful tool’ but it’s irresponsible and obnoxious. just sayin’
        on a more positive note, your summation of youtube options is really helpful, thank you!

        • jimdougherty

          Thanks for your comment. I don’t mean to sound like I disagree with your premise, but I will say that despite the general apprehensiveness towards autoplay video it has been studied and found quite effective. An analog might be ads in gmail – people by and large don’t want them but many click-through regardless.

          Not that it makes autoplay videos any less annoying to the user, but saying that they’re a “np-no” is not accurate from a marketing perspective. They’re actually quite effective.

  • Talknology

    so THAT’S how they do it! Great share, Jim.

    • jimdougherty

      Thank you for reading and commenting!

  • Lisa Cash Hanson

    Right selfish or not I”m glad you did LOL I need to book mark how do they add that white play button have you seen that?

    • jimdougherty

      Hi Lisa! I think that you would do everything I did without autofollow. For example:


      and that should give you a video screen with just the play button! Thanks for reading and commenting!

  • TheTysonReport

    Very useful Jim, thank you.

    • jimdougherty

      Thanks for reading and commenting!

  • Tony Restell

    Great post Jim, thanks. I have another one for you to add to the list – having a video start part way through the recording if there’s some content you want to skip or a particular section of the video you want to show…

    I was writing a piece on using Facebook for recruiting and had a great webinar recording to use as part of the post (see: but the problem was that the first 2 minutes of the video came across unprofessional – checking the audio was working etc. and so I wanted to skip that. The code to achieve this is to add to your URL


    where the number equals the number of seconds into the video that you want it to start from.

    Hope this helps someone out there – and will certainly be looking to incorporate your other suggestions Jim. Not showing suggested videos at the end was something I’d already taken care of, but the other whitelabelling suggestions are great, thank you!

  • Lisa Ladrido

    Thank you Jim! WordPress only allows me to add the URL to the video. I haven’t been able to use the html like I was able to with Blogger. Should I be using a specific WP plugin instead so I can edit the html? Thanks for another great post!

    • Samantha Gluck

      Lisa, you can add embed code if you’re self-hosting on a wp platform….

    • jimdougherty

      Hi Lisa, as Samantha said this is for self-hosted ( websites. If you are using, here is a post that describes how to embed youtube videos:

      It’s been awhile since I used, but it appears from that article that you can accomplish the same things by adding the codes to the end of the video link. I’m curious and happy to help if you ever find yourself wanting to do this. Shoot me a message! Thanks for reading and commenting!

      • Lisa Ladrido

        I am on the self hosted WP. For some reason each time I would add the html code the video wouldn’t show up. However, it does when using the URL. Therefore, I am unable to edit the code. I will check it out again the next time I need to use a video on a post. Thanks Jim and Samantha!

        • jimdougherty

          Thanks Lisa! Next time (if you like) I’d be happy to help troubleshoot for my own educational purposes.

    • Rick

      Hi Lisa,
      Use the “TinyMCE Advanced” plugin, it’s free

  • Ryan

    Cheers Jim, I had been looking for this for a while, especially getting rid of the recommended videos at the end. For some reason I still cant get rid of the black bar at the top of the video. I have put the showinfo=0″ attribute into the code but it hasn’t worked. Any ideas? My site is if that helps?

  • David Guzman

    Thanks Jim, GREAT article! Thanks for sharing!

    • jimdougherty

      Appreciate the note, David – Thanks!

  • Beena

    Thanks for help :)

    • jimdougherty

      Of course!

  • azatrum

    very very helpful!


  • Christopher Pelton

    Thanks a million for this. It was exactly what I needed.

  • Hussain Badusha

    Very useful notes that you’ve given.
    Thanks very much for providing this…

    • jimdougherty

      Thanks Hussain!

  • Jonathan


    • jimdougherty

      I don’t know if that’s possible. Sorry.

  • Joseph Rodrigues

    Awesome, very clear and concise!

    • jimdougherty

      Thanks Joseph!

  • Shishir Bhilawadikar

    What a superb post. Just loved reading it. Always wondered how to do these customizations. Thanks for posting this Jim.

    • jimdougherty

      Thanks so much Shishir.

  • Katya Verman

    Hello! Can you tell how to stop all the suggestions of the different videos which are not related to Company’s videos or how to make the video start from the beginning after ending?

    • jimdougherty

      Hi Katya,

      Sure.For the related posts the command you’re interested to change is “rel” – it can be either “0” or “1” and to turn it off, you want it to be “0.” &rel=0
      To repeat your video the command you are looking for is “loop.” It can be a value of “0” (no repeat) or “1” (repeat). &loop=1
      Hope that helps!

  • Keef Hellinger

    very useful thx, do you know how to remove the black border so that it is transparent and blends into my website. I have sized video to full page width via custom size but on a tablet the black border comes straight back? many thx in anticipation keef…. ps theme=light doesn’t work

    • jimdougherty

      I’m sorry – I looked into this and it doesn’t look like it’s easily possible in the new player. If YouTube gives you an option to use the old embed code you can use border=”0″ – otherwise I expect there is a solution but it’s beyond my technical aptitude. Sorry!

  • JD

    Great info! FYI, your font size and page width is huge, I am on a 22″ monitor and still had to scroll left and right.

    • jimdougherty

      Appreciate the feedback – the site is supposed to be responsive, so I’ll have to do some more testing. Cheers!

  • James

    Thanks for the tips. Have you been able to successfully embed a youtube playlist, with the thumbnails/sidebar to show up on the right hand side of player? Just like when you visit your own youtube page. I can embed the player along with the playlist, but users must click on the top left of the video. Some older folks may struggle with this. Thanks!

    • jimdougherty

      Hi James – I don’t have any experience with playlists myself and I tried to take a look and see if I could offer an idea of how to handle your situation and it’s beyond me. Sorry!

  • Mark F Simmons

    Thanks for this!

  • Stephanie Deneke

    NICE! I’m making a capture page tonight and I just googled how to do the autoplay and your post showed up on page 1…. finding the other codes was a bonus so I bookmarked this on my browser :) I’m still trying to figure out how to hide the YouTube watermark in the lower right corner that says “watch on youtube” when you hover over it. If anyone knows how to do that it would be awesome to know.

    • jimdougherty

      Thanks Stephanie – your comment made me redo the entire most with more detail. I’m not sure that there is anyway to get rid of the watermark appropriately, but I hope the examples give you a visual of what each parameter can do. Very helpful comment – thank you!

  • Ryan J. Rhoades

    This is fantastic, Jim – thanks so much!

  • Carlos Davis

    Excelent! great helpful information, thanks. Regards

  • Stekker

    Thanks a lot for this post! Very useful!

  • Naveen

    Great very helpful… Thanks a lot

  • Harsha Vardhan

    I have a problem with the time – Start & End component it seems, though the video is successfully embedded with no controls, titles, the video is playing beyond the end time. See an example here –

    Can you suggest me the solution!

  • jimdougherty

    Hi Harsha! In your embed code, believe that the second question mark (?) is throwing things off. I think if you replace it with “&” it should work.

    • Harsha Vardhan

      Thank You! This worked.. However, I see that once the part of the video stops playing, YouTube buffer icon appears, and it seems, YouTube is trying to play in the full video now.. Your views on this?

      • jimdougherty

        If I’m looking at the embed correctly, is there a semicolon instead of an ampersand between start and end? Maybe that would fix it? Other than that, I don’t know what the issue might be.

    • Harsha Vardhan

      Hello again.. can you also let me know how to apply the same settings to a YouTube playlist embed .. I am trying to use the same code, but am getting a message ‘Video not available’.

      • jimdougherty

        Hi Harsha – If you’re looking at the example that I put on there, the video was pulled from YouTube, and if the first video doesn’t work the others won’t either. If you’re talking about applying different parameters to different videos, I don’t have too much experience with that. You may want to experiment with it and see what works. Cheers!

  • Marc Dubeau

    Hi Jim,

    Is there an embed code that can be used to get rid of the sound on a youtube embed?

    • jimdougherty

      Hi Marc,

      I looked again and I don’t know that you can control that with the embed options. I don’t know if the video is copyrighted, but if not I would copy the video and use a video editing program to marry the preferred audio to video and post to YouTube.

  • Mitty

    Hi, thx, that is what I was looking for, but one thing I need more. Disable option after right click to get URL of video. Anyone knows how do that?

    • jimdougherty

      Hi David, I don’t know how to do this. Sounds like something that you may have to do external to the embed script.

  • Ya

    Awesome post – thanks. Thanks Jim …. it’s life Jim but not as we know it … not as we know it … not as we know it ….

  • Joy

    Hello, Jim. Do you know how to get a video to auto start with a delay of 30 seconds?

    • jimdougherty

      Hi Joy,

      If I understand your question correctly, I don’t know that you can delay the playback of an embedded video. There may be a way to load the script later, but it wouldn’t be something you can do within the embed script (I don’t think). Sorry.

  • aroundseven

    great post. Thanks!

  • Nancy Munford

    I am not able to edit my embed settings anymore – does not take input. Is there a setting for this or do I need another kind of account? I was able to edit the input box when I did another website earlier this year. thanks

    • jimdougherty

      Hi Nancy,

      I just checked and don’t see a change. If you want to send a link I can offer a second set of eyes…..


  • Tene Williams

    Excellent info! I tweeted it. The thing that kills me is whether you can stop the video from loading on each page. I run several wordpress blogs and I want the video to play only once to a viewer. So far it seems it can only be done in the master CSS file. Is there a way to do it in the video?

    • jimdougherty

      Hi Tene,

      Not that I’m aware of. I’m guessing that wouldn’t be something that would behoove Google to develop. I could be wrong on both accounts, though….


  • Colton Bridges

    Hey Jim, Thanks so much for the info. It helped me an incredible bit. The only information I had to find elsewhere was how to fit it into as3 object embeds. but you made it so easy and so clear it was just a copy and paste. I will be sending my guys here as reference from my blog. Thank you so much.

    Colton Bridges

  • Giridharan Dhanashaker

    Hi Jim,

    How do I embed a youtube video with interactive transcript with it?

    • jimdougherty

      I’m not familiar with that one. A transcript you would simply put in your video, but interactivity is a whole other level. Cheers!

  • Steve Allen

    Jim, One of the most complete posts I’ve read on “how to” do anything. This is what I wanted to see. Had bits and pieces before, but now I have code to do anything I want! Thanks!

    • jimdougherty

      Very gratifying to read, Steve – thanks for your note!

  • Grace

    This was great! Thank you so much for all the little tips I gleaned. I have one question, however; you have multiple videos on this page. Is there a code that can be added to the videos that makes one stop playing with I click on another video on the same page? Thank you again!

    • jimdougherty

      HI Grace, not that I know of. The benefit of embeds from YouTube is that all of the content is served by Google, so I suspect that it would be difficult to synchronize disparate embeds like that. If it is possible, it’s beyond my capabilities. For a simpler solution, maybe a playlist would be appropriate? Cheers!

      • Grace

        Thank you for your prompt reply, Jim. I shall pursue your idea…!

  • bob

    How to delay video from playing ?

  • David

    Thanks – very useful information and to the point.

  • Pal

    Hi Jim, sorry if you’ve been asked this a 100 times but can you use the modestbranding=1 and showinfo=0 parameters together successfully? I want to hide the title and the youtube logo.

    Thanks – great piece by the way!

  • Dylan Antonacci

    This helped out beyond all belief. What I was trying to do is adjust the embed code of an entire playlist as to have the first video start at specific time during the first loop but then go back to the default on ever loop there after. I merely added the “&start=…” code the the end of the list series coding index and it worked out really well. Thanks!

  • Steph

    Hi Jim
    Great post!
    I’m having a single issue, with Youtube hiding the video when it is embeded in the iframe like this.
    The video is viewable on youtube, but it gets filtered when embeded.

    Is there a parameter that will alow the video to show? Somehow to mark it safe for all?

    • Jim Dougherty

      Hi Steph, let me restate what I’m hearing you say: when the video is embedded in an iframe it is flagged as NSFW, correct? I haven’t heard of that before, but this forum (!topic/youtube/32tHQqeTsIk%5B1-25-false%5D) discusses some of the semantic triggers of safety mode and some issues that people have had in Europe about that feature. I’ve been trying to see if there is a way to appeal this and I can’t find any technical support contact that may be able to help – go it could be something you can fix yourself or a glitch in the matrix.

  • Steph

    Writing again with my name as the title – because I don’t want you to think my comment was by a spambot trying to get a link. In fact, for all I care you can erase the link to my website.

    Just wanted to say that I visited many sites trying to get full answers regarding the embedding options. All other sites provided partial results. Yours is very thorough, and I loved the demos.

    Thanks for the high quality info!
    Marked your site and will visit your other posts soon.

    • Jim Dougherty

      Hi Steph – thanks. I was switching servers and didn’t want to reply until everything migrated over. :) I appreciate your kind comment!

  • Replica Christian Louboutin

    Hi would you mind letting me know which webhost you’re utilizing?
    I’ve loaded your blog in 3 different web browsers and I must say this blog loads a lot faster then most.
    Can you suggest a good internet hosting provider at a fair price?
    Thanks, I appreciate it!

  • Matt West

    Great to see all these options explained in full. Thanks!

  • Kate Mayo

    Still relevant more than 2 years later. I was looking for the proper order/format to activate more than one code, and I found it in the almighty ampersand. And I learned so much more! Thanks for this post!

  • Haley

    HI! I am using the modest branding & showinfo code, however is there any way to completely get rid of the youtube brand? there is now a watermark in the lower right side of my video player.


    • jimdougherty

      Thanks Haley –

      I think you’re stuck with some sort of YouTube branding regardless of option. If you’re embedding on a site, you could upload to the media files via FTP and host the media yourself, too?

  • Jimmy

    Looks nice but… 13 (html5) errors! 13 ERRORS!!!

  • Duncan Harding

    HI Jim ; great article ; would you happen to know if there is a code that turns on the subtitles on a YouTube video autmoatically ?

    TIA ; Duncan

    • jimdougherty

      Hi Duncan,

      Try cc_load_policy=”1″ and see if that turns them on by default. Here’s the YouTube explanation of this parameter:

      cc_load_policy (supported players: AS3, HTML5)Values: 1. Default is based on user preference. Setting to 1 will cause closed captions to be shown by default, even if the user has turned captions off.

  • Eka Novianty

    Thank you Jim, this article really helps me. Especially for removing suggestion videos at the end.

  • Dima Taras

    thx for article. really helped me.