FeaturesHow it worksPricingBlog
All articles
GuideMay 12, 2025 · 5 min read

How to Embed YouTube Shorts on Any Website (2025 Guide)

Why the Native YouTube Embed Isn't Enough

Copying a YouTube share URL and pasting an iframe works — but it gives you a 16:9 horizontal player with YouTube's branding, no analytics, and zero control over the viewing experience. Shorts are 9:16 vertical. An iframe forces them into the wrong format.

More importantly, native embeds send your visitors back to YouTube. Every click on the channel name or a related video is traffic you just handed away.

What You Actually Need

A proper Shorts embed should display vertical video natively, autoplay in viewport (like the native Shorts experience), let you stack multiple Shorts in a scrollable feed, and keep analytics on your own dashboard.

Option 1: EmbedShorts (no-code, 2 minutes)

1. Sign up at embedshorts.com — free plan available

2. Add your YouTube channel URL

3. EmbedShorts fetches your Shorts automatically

4. Copy the embed code and paste it anywhere:

<script src="https://cdn.embedshorts.com/widget.js"
        data-feed="your_feed_id"
        async defer></script>

The widget is under 15 KB, loads asynchronously, and auto-syncs new Shorts via YouTube webhooks — no manual updates needed.

Option 2: Build It Yourself

Step 1 — Get the uploads playlist ID

GET https://www.googleapis.com/youtube/v3/channels
  ?part=contentDetails&id=YOUR_CHANNEL_ID&key=YOUR_API_KEY

Step 2 — Fetch playlist items (paginated, 50 per page)

GET https://www.googleapis.com/youtube/v3/playlistItems
  ?part=snippet&playlistId=UPLOADS_PLAYLIST_ID&maxResults=50&key=YOUR_API_KEY

Step 3 — Filter for Shorts (duration ≤ 60s)

GET https://www.googleapis.com/youtube/v3/videos
  ?part=contentDetails&id=VIDEO_ID_1,VIDEO_ID_2,...&key=YOUR_API_KEY

Parse `contentDetails.duration` (ISO 8601 — `PT45S` = 45 seconds) and keep only videos ≤ 60 seconds.

Step 4 — Build the player

Use the YouTube IFrame API with `autoplay=1&mute=1` per video, and an Intersection Observer to trigger play and pause as the user scrolls.

This approach takes 2–3 weeks of engineering time. EmbedShorts does all of this plus real-time webhook sync, analytics, and a customization dashboard.

Key Takeaway

For most brands, EmbedShorts is the right call — fast to deploy, zero maintenance, and far cheaper than building it yourself. If you have very specific requirements around a custom player UI or proprietary analytics pipeline, the DIY approach is worth the investment.

Either way, adding Shorts to your site is one of the highest-ROI changes you can make to a product page or landing page right now.

Ready to add Shorts to your site?

Free plan available. No credit card. 2-minute setup.

Start for free →