Twitch Embed Code Generator

Embed a Twitch live stream, past broadcast or clip on your website for free. Add your domain and copy a ready-to-use player code. No sign-up needed.
Shows the channel’s live stream. A name or a link, e.g. https://www.twitch.tv/twitch
Want the whole channel as a gallery that updates itself?
Corner radius

Embed the video

<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>

  1. Click Copy code above to copy it.
  2. Open the page’s HTML file or template.
  3. Paste the code inside <body>, where the content should appear.
  4. 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 →

Before you go

Need more than one video? Show the whole channel as an interactive gallery that updates itself.

Create a Twitch gallery →
Or share this free tool:
Elfsight Video Gallery

Show streams and videos from several channels

Video Gallery displays Twitch videos from a channel or category, next to your YouTube videos.
  • 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

Twitch’s embed code works, but you have to fill in your domain and pick the right player yourself. Here is the difference.
Twitch’s own Embed button
This generator
Your domain (parent)
You add each domain to the code by hand.
Type one or more domains; https://, paths and ports are removed for you.
Streams, videos and clips
Different players and URLs for each.
Paste any twitch.tv or clip link — it picks the right player.
Video IDs
Need a v in front of the number.
Adds the v for you.
Autoplay
Streams and videos start on their own by default; clips don’t.
Off unless you turn it on; Start muted is on by default.
Size
You set width and height; at least 400×300 px.
Optional 16:9 responsive wrapper.

Your domain (parent)

Twitch’s own Embed button

You add each domain to the code by hand.

This generator

Type one or more domains; https://, paths and ports are removed for you.

Streams, videos and clips

Twitch’s own Embed button

Different players and URLs for each.

This generator

Paste any twitch.tv or clip link — it picks the right player.

Video IDs

Twitch’s own Embed button

Need a v in front of the number.

This generator

Adds the v for you.

Autoplay

Twitch’s own Embed button

Streams and videos start on their own by default; clips don’t.

This generator

Off unless you turn it on; Start muted is on by default.

Size

Twitch’s own Embed button

You set width and height; at least 400×300 px.

This generator

Optional 16:9 responsive wrapper.

How to use the Twitch Embed Code generator

  1. Choose what to embed

    A live channel, a past broadcast or a clip.

  2. Add your domain

    Twitch only plays embeds on the domains listed in the parent parameter.

  3. Copy the code

    Paste it into an HTML or embed block on that domain.

Twitch embed parameters

Parameter
What it does
Example
channel
Shows a channel’s live stream.
channel=yourchannel
video
Shows a past broadcast, highlight or upload. The ID needs a v in front.
video=v123456789
collection
Plays a collection of videos. With video, starts from that video.
collection=abc123
clip
Shows a clip. Used with https://clips.twitch.tv/embed.
clip=SlugOfTheClip
parent
Domain allowed to show the player. Required. Repeat it for every domain.
parent=example.com&parent=www.example.com
autoplay
Starts playback without a click. Default true for streams and videos, false for clips.
autoplay=false
muted
Starts with the sound off. Default false.
muted=true
time
Start point of a video, in hours, minutes and seconds.
time=1h2m3s
width, height
Player size in pixels or percent. Minimum 400×300.
width="100%"
allowfullscreen
iframe attribute that lets viewers go fullscreen.
<iframe … allowfullscreen>

channel

What it does

Shows a channel’s live stream.

Example

channel=yourchannel

video

What it does

Shows a past broadcast, highlight or upload. The ID needs a v in front.

Example

video=v123456789

collection

What it does

Plays a collection of videos. With video, starts from that video.

Example

collection=abc123

clip

What it does

Shows a clip. Used with https://clips.twitch.tv/embed.

Example

clip=SlugOfTheClip

parent

What it does

Domain allowed to show the player. Required. Repeat it for every domain.

Example

parent=example.com&parent=www.example.com

autoplay

What it does

Starts playback without a click. Default true for streams and videos, false for clips.

Example

autoplay=false

muted

What it does

Starts with the sound off. Default false.

Example

muted=true

time

What it does

Start point of a video, in hours, minutes and seconds.

Example

time=1h2m3s

width, height

What it does

Player size in pixels or percent. Minimum 400×300.

Example

width="100%"

allowfullscreen

What it does

iframe attribute that lets viewers go fullscreen.

Example

<iframe … allowfullscreen>

Source: Twitch Developers: Embedding Video and Clips

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

What you embed
Player URL
Live stream
https://player.twitch.tv/?channel=NAME&parent=example.com
Past broadcast, highlight or upload
https://player.twitch.tv/?video=v123456789&parent=example.com
Collection
https://player.twitch.tv/?collection=ID&parent=example.com
Clip
https://clips.twitch.tv/embed?clip=SLUG&parent=example.com

Live stream

Player URL

https://player.twitch.tv/?channel=NAME&parent=example.com

Past broadcast, highlight or upload

Player URL

https://player.twitch.tv/?video=v123456789&parent=example.com

Collection

Player URL

https://player.twitch.tv/?collection=ID&parent=example.com

Clip

Player URL

https://clips.twitch.tv/embed?clip=SLUG&parent=example.com

A 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

Embed code
Video Gallery
Videos per embed
One video (or one playlist)
Unlimited videos in one widget
Stays up to date
Edit the code for every new video
New Twitch videos appear automatically
Mix sources
One platform per snippet
YouTube, Vimeo, TikTok, Instagram, Twitch and any video link
Layouts
Single player
Player with Gallery, Carousel, Grid, Masonry, Playlist
Responsive design
Needs a CSS wrapper
Built in
Coding
Copy and paste code for each video
No code — edit visually in the editor
Price
Free
Free plan, no credit card needed

Videos per embed

Embed code

One video (or one playlist)

Video Gallery

Unlimited videos in one widget

Stays up to date

Embed code

Edit the code for every new video

Video Gallery

New Twitch videos appear automatically

Mix sources

Embed code

One platform per snippet

Video Gallery

YouTube, Vimeo, TikTok, Instagram, Twitch and any video link

Layouts

Embed code

Single player

Video Gallery

Player with Gallery, Carousel, Grid, Masonry, Playlist

Responsive design

Embed code

Needs a CSS wrapper

Video Gallery

Built in

Coding

Embed code

Copy and paste code for each video

Video Gallery

No code — edit visually in the editor

Price

Embed code

Free

Video Gallery

Free plan, no credit card needed

Frequently asked questions

Official documentation

More free tools

Related guides

How to embed a video on a website

Upload the video to YouTube or Vimeo and paste its embed code, use the HTML5 video tag for files you host yourself, or use a video gallery widget when you need several videos. Here’s how each method works and when to use it.How to embed a video on a website