YouTube’s own Share menu gives you a fixed-size player and almost no options — and hand-typing parameters like start, loop, or privacy mode is slow and easy to get wrong. This free youtube embed code generator turns any public YouTube link into a ready-to-paste iframe: responsive by default, with the player options you actually want, and a live preview before you copy. It builds code only — it never downloads, hosts, or converts the video, and it cannot make a private or embedding-disabled video playable. Everything runs in your browser, with no signup.

How to use this youtube embed code generator

Paste a link, set the player, copy the code.

1Paste the YouTube link

Any watch, youtu.be, Shorts, live, or existing embed link works — the video ID is pulled out automatically.

2Choose size and options

Keep the responsive 16:9 player, or set a fixed size; add a start time, autoplay with mute, loop, or privacy-enhanced mode.

3Preview, then copy

Check the preview plays as expected, copy the iframe code, and paste it into your page, blog, or course.

Why this youtube embed code generator beats copying YouTube’s default code

The default embed is a starting point. This one is finished code.

Responsive on every screen

The player keeps its 16:9 shape at any container width, instead of overflowing on phones or sitting small on wide monitors.

Privacy-enhanced option

Switch the player host to youtube-nocookie.com so YouTube sets no cookies until a visitor presses play — noting honestly that the browser still connects to YouTube when the player loads.

Loop and autoplay done correctly

A single video only loops when the playlist parameter carries the same video ID, and browsers require autoplay to start muted — both are handled automatically instead of left for you to debug.

Shorts and playlists included

Shorts links become standard players (in a vertical 9:16 frame if you choose), and playlist links build a playlist player that plays every video in order.

Player parameters worth knowing before you paste

A handful of parameters cover nearly every embed request — and two common mistakes.

start and end use whole seconds in embeds. An embed URL takes start=90, not the t=90s spelling used on watch pages. This generator writes the embed spelling for you, so a link parameter pasted into an iframe does not silently start at zero.

Autoplay needs mute, and loop needs playlist. Modern browsers block audible autoplay, so an autoplay embed must also carry mute=1. And a single video loops only when playlist is set to the same video ID — without it, loop does nothing, which is the most common reason a looping embed fails.

rel and modestbranding shape the end screen, not the video. Setting rel=0 limits related videos to the same channel, and modestbranding reduces YouTube branding on the player. Neither changes the video itself, and neither overrides a creator’s choice to disable embedding — if the preview shows a restriction, ask the owner to enable embedding.

YouTube Embed Code Generator FAQs

Short, direct answers to the questions readers ask most.

Paste any public YouTube link, choose the size and player options, preview the result, and copy the iframe code into your page.

Yes. Paste the Shorts link and the tool extracts the video ID and builds a standard player — choose a vertical 9:16 frame if you want it to keep the Short’s shape.

No. It switches the host to youtube-nocookie.com so no cookies are set until play is pressed, but the visitor’s browser still connects to YouTube when the player loads.

The usual causes are a private video, a creator who disabled embedding, or a regional or age restriction — all decided by YouTube, not by the embed code. The generator builds valid code, but it cannot override those restrictions.

Yes. It builds code entirely in your browser — no account, no signup, and no video is ever downloaded.