Social feed widgets for any website

YouTube Widget - HTML Embed Code

Display your YouTube channel or playlist on any website with a single line of embed code. No iframes, no heavy scripts, no technical skills required. Works on WordPress, Shopify, Squarespace, Wix, Webflow, and custom HTML sites.

Live YouTube Videos Widget

This is a real YouTube video feed widget — fully interactive and auto-updating. This is exactly what visitors to your website will see.

The Simplest Way to Embed YouTube Videos on Your Website

YouTube's native embed only supports a single video at a time — and each one is a heavy iframe that slows your page down. If you want to showcase your entire channel or a playlist, you'd need to manually embed each video and keep updating the page every time you upload new content.

Social Media Feeds gives you a clean, one-line HTML embed code that displays your YouTube channel or playlist as a beautiful, auto-updating feed. High-quality thumbnails, view counts, like counts, and video titles — all in a customisable widget that loads in milliseconds without heavy iframes.

Your embed code is generated in our dashboard after you connect your YouTube channel and customise the widget design. Copy it, paste it into your website's HTML, and your live YouTube feed appears instantly. It updates automatically, so every new upload shows up on your website without you touching any code.

Step-by-Step Setup

Follow these steps to get your YouTube video widget live.

1

Create Your Widget

Sign up at Social Media Feeds and enter your YouTube channel URL or playlist URL. We connect to the YouTube Data API and pull your latest videos into a preview widget — no API key or developer setup required.

2

Customise the Design

Choose from grid, card, list, or carousel layouts. Adjust colours, fonts, border radius, and spacing to match your website. Toggle view counts, like counts, and video descriptions on or off.

3

Copy the HTML Embed Code

Your embed code is one line of HTML: a <div> tag with your unique widget ID, plus a <script> tag. That's it — no iframes, no external CSS files, no dependencies.

4

Paste into Your Website

Add the embed code to any page on your website. In WordPress, use a Custom HTML block. In Shopify, use a Custom Liquid section. In Squarespace or Wix, use a Code block. On a custom site, paste directly into your HTML.

5

Your Video Feed Is Live

Your YouTube feed appears immediately and updates automatically based on your plan's refresh interval. New video uploads show up on your website without any manual action.

Key Benefits

Everything you need to display your YouTube videos on your website — without the complexity.

One Line of Code

Your entire YouTube video widget is a single HTML div tag plus a script tag. No complex setup, no framework dependencies, no build tools required.

Works Everywhere

WordPress, Shopify, Squarespace, Wix, Webflow, Ghost, Hugo, Jekyll, or plain HTML — if your site supports custom HTML, the embed code works.

No Heavy Iframes

Unlike YouTube's native embed, Social Media Feeds doesn't use iframes for each video. Your widget is lightweight, loads faster, and doesn't create performance issues.

Full Channel or Playlist

Display your entire YouTube channel feed or a specific playlist — not just one video at a time. Show visitors your full video library.

Automatic Updates

Upload a new video to YouTube and your website updates automatically. Depending on your plan, new videos appear within minutes to hours — no manual embedding needed.

Engagement Stats

Display view counts, like counts, and comment counts alongside each video. Show visitors the popularity and authority of your video content.

Your Embed Code

Once you've created your widget, you'll get a simple embed code like this. Paste it anywhere on your website.

<!-- Paste this where you want your YouTube videos to appear -->
<div data-youtube-widget data-embed-id="your-embed-id"></div>
<script src="https://socialmediafeeds.com/embed/widget.js"></script>

The YouTube embed snippet

The YouTube snippet is a div with the attribute data-youtube-widget and your data-embed-id, followed by a script tag loading widget.js from socialmediafeeds.com. The script runs in the browser, fetches the thumbnails, titles and counts for your channel or playlist and builds the video grid inside the div.

Unlike pasting a single YouTube iframe, one widget shows a whole set of videos and keeps itself current as you upload. Keep one script tag per page, even if the page also holds a Google reviews or Instagram widget.

Performance and consent on custom sites

The widget loads the YouTube player only after a visitor clicks a thumbnail, which keeps the first load light and helps Core Web Vitals.

Set a width on the parent container and the grid adapts to it. If you use a Content Security Policy, allow socialmediafeeds.com for scripts and images, and youtube.com for frames, so the player opens when a video is clicked.

Common YouTube issues and fixes

Thumbnails appear but nothing plays when the Content Security Policy blocks frames from youtube.com, so add it to your frame-src rule. An empty widget usually means a missing div or script tag, or a channel URL that is not public. Press Refresh in your dashboard if new uploads are missing, and check that the channel or playlist URL is the public address, not a link to a single video.

More help: Widget not showing on my website.

Plan facts for this widget

  • Free: 1 widget, unlimited views, manual refresh only, Social Media Feeds branding.
  • Paid plans start at $5 per month (AUD, excluding GST) with automatic daily refresh and no branding.
  • Every plan includes unlimited views and all six platforms.

Compare every plan on the pricing page, or read the main YouTube Website Widget guide.

Frequently Asked Questions

What does the YouTube widget embed code look like?

The embed code is two elements: a <div> tag with a data-youtube-widget attribute and your unique embed ID (e.g., <div data-youtube-widget data-embed-id="4381de39f4bbf1c8"></div>), plus a small <script> tag that loads the widget. That's the entire implementation.

Is this different from YouTube's native embed?

Yes. YouTube's native embed is a single-video iframe that's heavy and slow. Social Media Feeds displays your entire channel or playlist as a lightweight, customisable feed — multiple videos with thumbnails, titles, and engagement stats, all without iframes.

Do I need a YouTube API key?

No. Social Media Feeds handles all the YouTube Data API integration for you. Just enter your channel or playlist URL in our dashboard and we pull your videos automatically. No developer console, no API keys, no quota management.

Will the embed code slow down my website?

No. The script loads asynchronously (after your page content), so it doesn't block rendering or affect Core Web Vitals scores. Video thumbnails are optimised for web delivery and the widget typically loads in under 200ms.

Can I embed multiple YouTube feeds on one page?

Yes. Each widget has its own embed code with a unique ID. Paste as many as your plan allows — they load independently and don't interfere with each other. You could show different playlists on different sections of a page.

Does the embed code work on Shopify?

Yes. In Shopify, add a Custom Liquid section or use the Custom HTML option in Online Store > Themes > Customize. Paste the embed code and your YouTube video feed appears on your store.

Can I show a specific playlist instead of my whole channel?

Yes. When creating your widget, enter a YouTube playlist URL instead of a channel URL. The widget displays only the videos from that playlist, making it perfect for tutorials, product demos, or curated collections.

Does the YouTube HTML embed load the video player straight away?

No. The player loads when a visitor clicks a video thumbnail. Until then only lightweight thumbnails are shown.

Can I embed a single video with this code?

The widget is built for a channel or a playlist. For one video, create a playlist containing only that video and point the widget at it.

Which CSP rules does the YouTube widget need?

Allow socialmediafeeds.com for scripts and images, and youtube.com (or youtube-nocookie.com where used) for frames. Without the frame rule, thumbnails show but the player cannot open.

Ready to Add Your YouTube Videos to Your Website?

Start with a free plan. Explore paid plans for more widgets and features. Set up your first widget in under 5 minutes.

Choose the plan that fits your website.