Twitch embed code generator
Put a Twitch channel, video, clip, collection or chat on your own site. Paste a link, add your domain, and copy responsive iframe code that keeps its aspect ratio anywhere.
- No sign-up
- Runs in your browser
- Responsive by default
Channels, videos, clips and collections. A bare channel name works too.
Required by Twitch. Use the domain the page is served from, and add www too if your site answers on both. Separate with commas. HTTPS only.
Chat needs a channel. Videos, clips and collections have no chat to embed.
Hours, minutes, seconds. Videos only.
Supported links
- Channel
twitch.tv/channelname - Video
twitch.tv/videos/123456789 - Clip
twitch.tv/channelname/clip/ClipSlug - Clip (short)
clips.twitch.tv/ClipSlug - Collection
twitch.tv/collections/CollectionId
Embed code
Paste a Twitch URL and your domain to generate the code.
Live preview
Your embed appears here
Previewed on this domain. The code above uses the domain you entered.
Embedding is a supported Twitch feature. This tool only builds the URL - nothing is sent to us, and no Twitch account is involved.
Why Twitch embeds say “refused to connect”
Twitch will not load a player unless the embed URL carries a
parent
parameter matching the domain of the page doing the embedding. Get it wrong and the
iframe renders an error instead of your stream.
The rules
- Bare domain only. No
https://, no trailing slash, no path.example.com, nothttps://example.com/live. - Every domain you serve on. The parameter can be repeated. If your site answers on both the apex and www, list both or the embed breaks on one of them.
- HTTPS only. An embed on an insecure page will be refused whatever the parent says.
- Your domain, not Twitch’s. The parent is
where the player is being shown, so it is never
twitch.tv.
How the generator works
- 1 Paste your Twitch URL Any channel, video, clip or collection link. The generator works out which kind it is and shows only the options that apply to it.
- 2 Add the domain you're embedding on Twitch requires a parent domain and refuses to load without a matching one. Add both your apex and www domains if you serve on both.
- 3 Choose size and playback Pick an aspect ratio and an optional max width, then decide on autoplay, muted, and a start time for videos.
- 4 Copy the code You get a responsive iframe that keeps its aspect ratio in any container. Paste it into any HTML page, WordPress block or site builder.
What it handles for you
- Every embeddable Twitch type Channels, videos, clips and collections, plus chat on its own for a sidebar or an OBS browser source.
- Gets the parent domain right The commonest reason an embed shows 'refused to connect' is a missing or wrong parent. The generator sets it for you and accepts more than one domain.
- Responsive by default The generated wrapper holds its aspect ratio at any width, so the player scales with your layout instead of overflowing on a phone.
- Correct start times Twitch expects a start time as 1h2m3s, not a number of seconds. Enter hours, minutes and seconds and the code carries the format Twitch actually reads.
- Live preview See the real player before you publish, so a wrong ID or a typo in the slug surfaces here rather than on your site.
- No sign-up, nothing stored It runs entirely in your browser. Nothing is sent anywhere, and there is no account to make.
Twitch embed questions
Why does my Twitch embed say 'refused to connect'?
Almost always the parent domain. Twitch only loads a player when the parent parameter matches the domain the page is served from, and it must be the bare domain with no https:// and no trailing path. The other common cause is an HTTP site - embeds require HTTPS.
Do I need both example.com and www.example.com?
If your site answers on both, yes. Twitch matches the parent exactly, so a code that only lists the apex fails on the www version. Enter both, separated by a comma, and the generator repeats the parameter for each.
Can I embed a Twitch stream on WordPress?
Yes. Paste the generated code into a Custom HTML block. Use the domain your site is actually served from as the parent, not your local development address.
Does autoplay always work?
No, and that is a browser rule rather than a Twitch one. Most browsers block autoplay with sound. Leaving muted on is what makes autoplay reliable.
Can I embed Twitch chat on its own?
Yes. Choose Chat only and enter a channel. That gives you the chat pane without the player, which is also what you want as an OBS browser source.
Will the embed work while the streamer is offline?
A channel embed shows Twitch's offline screen rather than failing. If you want something watchable when nobody is live, embed a video or a clip instead.