Twitch Embed Code Generator
<div style="position:relative;border-radius:24px;overflow:hidden;width:100%;aspect-ratio:16 / 9;"> <iframe style="position:absolute;inset:0;width:100%;height:100%;border:0;" src="https://player.twitch.tv/?channel=twitch&parent=example.com&autoplay=false&muted=true" title="Twitch player" loading="lazy" allowfullscreen></iframe> </div> <p style="margin:4px auto 0;text-align:center;font:11px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:#a3a7b0;">Created with <a href="https://elfsight.com/tools/twitch-embed-generator/" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;">Elfsight</a></p>
- Click Copy code above to copy it.
- Open the page’s HTML file or template.
- Paste the code inside
<body>, where the content should appear. - Save and upload the page, then open it in a browser to check.
Need more than one video?
Show the whole channel as an interactive gallery that updates itself.
See Video Gallery for HTML →Show streams and videos from several channels
Auto-updates when you publish new videos
Carousel, grid, masonry or player with playlist
YouTube, Vimeo, TikTok, Instagram, Twitch and any video link
No coding — works on any website
This generator vs Twitch’s own embed code
parent)https://, paths and ports are removed for you.v in front of the number.v for you.Your domain (parent)
Twitch’s own Embed button
This generator
https://, paths and ports are removed for you.Streams, videos and clips
Twitch’s own Embed button
This generator
Video IDs
Twitch’s own Embed button
v in front of the number.This generator
v for you.Autoplay
Twitch’s own Embed button
This generator
Size
Twitch’s own Embed button
This generator
How to use the Twitch Embed Code generator
Choose what to embed
A live channel, a past broadcast or a clip.
Add your domain
Twitch only plays embeds on the domains listed in the parent parameter.
Copy the code
Paste it into an HTML or embed block on that domain.
Twitch embed parameters
channelchannel=yourchannelvideov in front.video=v123456789collectionvideo, starts from that video.collection=abc123cliphttps://clips.twitch.tv/embed.clip=SlugOfTheClipparentparent=example.com&parent=www.example.comautoplaytrue for streams and videos, false for clips.autoplay=falsemutedfalse.muted=truetimetime=1h2m3swidth, heightwidth="100%"allowfullscreen<iframe … allowfullscreen>channel
What it does
Example
channel=yourchannelvideo
What it does
v in front.Example
video=v123456789collection
What it does
video, starts from that video.Example
collection=abc123clip
What it does
https://clips.twitch.tv/embed.Example
clip=SlugOfTheClipparent
What it does
Example
parent=example.com&parent=www.example.comautoplay
What it does
true for streams and videos, false for clips.Example
autoplay=falsemuted
What it does
false.Example
muted=truetime
What it does
Example
time=1h2m3swidth, height
What it does
Example
width="100%"allowfullscreen
What it does
Example
<iframe … allowfullscreen>The parent error — what it is and how to fix it
The player shows an error instead of the stream
Twitch makes every embed list the domains it runs on in the parent parameter. If it’s missing or doesn’t match the page’s domain, viewers get an error and a link to watch on Twitch. Put your domain in parent as a plain name, like parent=example.com — no https://, no path, no port.
It works on one address but not another
Add one parent for each domain the page opens on, for example parent=example.com&parent=www.example.com&parent=staging.example.com.
Your site isn’t on HTTPS
Twitch requires sites that embed its player to use an SSL certificate. Open the page over https://; a plain http:// page won’t play.
It fails only inside your site builder
Some builders show your code inside a frame on their own domain. Add that domain as another parent, or check the published page instead of the editor.
The player is too small
Twitch embeds must be at least 400 px wide and 300 px high.
Autoplay doesn’t start
Autoplay needs the player to be big enough and visible on screen. On phones viewers have to tap play. Don’t cover the player with other page elements.
Player links for streams, videos and clips
https://player.twitch.tv/?channel=NAME&parent=example.comhttps://player.twitch.tv/?video=v123456789&parent=example.comhttps://player.twitch.tv/?collection=ID&parent=example.comhttps://clips.twitch.tv/embed?clip=SLUG&parent=example.comLive stream
Player URL
https://player.twitch.tv/?channel=NAME&parent=example.comPast broadcast, highlight or upload
Player URL
https://player.twitch.tv/?video=v123456789&parent=example.comCollection
Player URL
https://player.twitch.tv/?collection=ID&parent=example.comClip
Player URL
https://clips.twitch.tv/embed?clip=SLUG&parent=example.comA channel embed shows the stream only while the channel is live. Clips have their own player on clips.twitch.tv. Every URL needs parent with your domain, and your site must use HTTPS. See Twitch’s video and clips embed docs.
Embed code vs. Elfsight Video Gallery
Videos per embed
Embed code
Video Gallery
Stays up to date
Embed code
Video Gallery
Mix sources
Embed code
Video Gallery
Layouts
Embed code
Video Gallery
Responsive design
Embed code
Video Gallery
Coding
Embed code
Video Gallery
Price
Embed code
Video Gallery