Free YouTube tool

YouTube Embed Code Generator

Paste a YouTube link to get a ready-to-use embed code: responsive, with start and end times, autoplay, loop, and privacy-enhanced mode.

How to embed a YouTube video

  1. 1

    Paste the video link

    Any public or unlisted YouTube video. A link with ?t= sets the start time for you.

  2. 2

    Pick the options

    Responsive size, start and end times, autoplay, loop, controls, captions, and privacy-enhanced mode.

  3. 3

    Copy the code

    Paste the iframe into your site, blog, Notion, WordPress, or any HTML block. The preview shows exactly how it plays.

A YouTube embed code generator with every option

YouTube's own Share > Embed dialog gives you a fixed-size iframe and a start time. This generator adds the options it hides: a responsive layout that fits phones, an end time, autoplay that actually plays, looping, hiding the controls, captions on by default, and the privacy-enhanced youtube-nocookie domain.

Where to paste the code

In WordPress, add a Custom HTML block. In Webflow and Squarespace, use an Embed or Code block. In Notion and most site builders, an embed block takes the plain video link, but the iframe gives you the extra options. In a React or Next.js app, swap frameborder for frameBorder and allowfullscreen for allowFullScreen.

Add the transcript under the video

A video embed tells search engines little about what's said in it. Pasting the transcript or a short summary below the player makes the page searchable and accessible. Get it free with the YouTube transcript generator, or through the API for many videos.

Need more?

Need transcripts at scale? Use the API

The same transcripts are available through the YouTube Transcript API: timestamped JSON, text, SRT, VTT, CSV, or Markdown, 150+ languages, and AI transcription for videos without captions. Or connect the YouTube MCP server to Claude, Cursor, or Codex and just paste links in chat.

curl "https://transcript-yt.com/v1/transcript?url=5f3Pn-N6yLc&format=text" \
  -H "Authorization: Bearer ts_live_..."

Common questions

How do I make a YouTube embed responsive?

Wrap the iframe in a container with padding-bottom: 56.25% (the 16:9 ratio) and position the iframe absolutely inside it. Turn on Responsive here and the code does that for you, so the video fills any width without black bars.

Why doesn't autoplay work?

Browsers only autoplay videos that start muted, so the generator mutes the video when autoplay is on. Some mobile browsers block autoplay entirely.

How do I make a YouTube video loop?

YouTube's loop parameter only works when the playlist parameter is set to the same video ID. Tick Loop and the generator adds both.

What is privacy-enhanced mode?

It embeds from youtube-nocookie.com, so YouTube doesn't store cookies on your visitors' browsers until they press play. It's the same player otherwise.

Can I embed only part of a video?

Yes. Set a start and an end time; the player starts at the first and stops at the second.

Is this free?

Yes. The generator runs entirely in your browser, with no sign-up and no limits.