Cutlark - Tools for YouTube Creators

Responsive

YouTube Embed Code Generator

Paste a YouTube link to generate embed code for your website. Choose responsive or fixed sizing, privacy-enhanced mode, a start time, autoplay with mute, default captions, or looping, then copy the iframe.

FreeNo signupInstant results

Your input stays in this browser unless live YouTube data is required.

How to embed a YouTube video

Configure once, paste anywhere.

  1. 1Paste a YouTube video link.
  2. 2Pick your options: responsive or fixed size, start time, autoplay, captions, loop, and privacy mode.
  3. 3Copy the generated iframe code and paste it into your site’s HTML.

Embed options

Everything the player supports

  • Responsive 16:9 wrapper or fixed width and height
  • Privacy-enhanced youtube-nocookie.com mode
  • Start time in h:mm:ss or seconds
  • Autoplay (muted), captions on, and loop
  • Copy-ready iframe and embed URL

Autoplay is paired with mute because most browsers block autoplay with sound.

Responsive by default

The responsive option keeps a 16:9 frame that scales to any container, so the player never overflows on phones.

Privacy-enhanced mode

youtube-nocookie.com embeds avoid setting YouTube cookies until the visitor plays the video.

Looping done right

YouTube only loops a single embedded video when the playlist parameter is set to the same ID — the generator adds it for you.

Common questions

YouTube embed code FAQ

Responsive embeds, autoplay, and privacy mode.

How do I embed a YouTube video on my website?

Generate an iframe from the video link, then paste it into your page’s HTML or an HTML/embed block in your website builder. This tool creates the iframe with your chosen options.

How do I make a YouTube embed responsive?

Wrap the iframe in a container with a 16:9 aspect ratio and set the iframe to fill it. Select the responsive option and the generator writes that wrapper for you.

Why won’t my embedded video autoplay?

Browsers usually block autoplay with sound. Autoplay works reliably only when the video is muted, which is why the autoplay option also sets mute.

What is privacy-enhanced mode?

It serves the player from youtube-nocookie.com, which YouTube describes as not storing information about visitors on your site unless they play the video.

Embedding guide

Embedding YouTube videos the right way

An embed looks simple, but a handful of parameters, one privacy setting, and some sizing math decide whether it plays well on every screen. This guide covers the parameters worth knowing, how responsive sizing works, why an embed sometimes refuses to play, and how to keep video embeds from slowing a page down.

Which embed parameters are worth knowing?

Useful YouTube embed parameters
ParameterWhat it doesWatch out for
startBegins playback a set number of seconds inThe player jumps to the nearest keyframe, so it can start up to about two seconds early
endStops playback at a set secondCounted from the beginning of the video, not from the start value
autoplay=1Starts the video when the page loadsBrowsers usually require mute=1 too, and autoplayed embeds do not add to the view count
loop=1Replays the video when it endsA single video only loops when playlist is set to the same video ID
controls=0Hides the player controlsViewers lose the seek bar and volume control
cc_load_policy=1Shows captions by defaultAdd cc_lang_pref to choose the caption language
rel=0Limits suggestions at the end to the same channelIt cannot switch related videos off entirely
playsinline=1Plays inline instead of fullscreen on iOSUseful for in-page players on iPhone

How does a responsive embed keep its shape?

A responsive embed fills the width of its container and sets the height from the video’s aspect ratio. The classic technique pads a wrapper by height divided by width, written as a percentage: 56.25% for a 16:9 video, 75% for 4:3, and 177.78% for a vertical 9:16 Short. Modern browsers can do the same job with the CSS aspect-ratio property.

Sizing values for common video shapes
Video shapeAspect ratioWrapper paddingCSS aspect-ratio
Standard video16:956.25%16 / 9
Older 4:3 video4:375%4 / 3
Vertical Short9:16177.78%9 / 16
Square video1:1100%1 / 1
Cutlark’s responsive option uses the 56.25% wrapper, which works in every browser.

What does privacy-enhanced mode change?

Privacy-enhanced mode loads the player from youtube-nocookie.com instead of youtube.com. YouTube says views in this mode are not used to personalize the viewer’s experience, either inside the embed or later on YouTube itself.

Turning it on only changes the domain in the embed URL, and the generator makes that switch for you when the option is selected.

Why won’t an embedded video play?

  • The owner turned off embedding. Creators can untick “Allow embedding” in a video’s details, and the video then will not play on other sites.
  • The video is age-restricted. These cannot be watched on most third-party sites, so viewers are sent to YouTube instead.
  • The video is private, removed, or still processing.
  • Your site sends no referrer. YouTube requires embedding pages to send an HTTP Referer header; without one, viewers see error 153. A strict no-referrer policy on your site can cause this.
  • Autoplay appears broken. Most browsers block autoplay with sound, so add mute=1 alongside autoplay=1.

How do you keep embeds from slowing a page down?

  • Add loading="lazy" to iframes further down the page so the player only loads when a reader scrolls near it.
  • Avoid stacking many players on one page; a single playlist embed or plain links are lighter.
  • Consider a click-to-load preview: show the thumbnail and load the real player only when someone presses play.
  • Reserve the player’s space with a width and height or an aspect ratio so the page does not jump while it loads.
Make a link that starts at a moment instead

Sources