Embed YouTube
Embed a YouTube video or playlist in a Confluence page with HTML Macro Pro. Always use the /embed/ URL, not the watch URL.
4 min read
Confluence Cloud
Forge platform
Updated
Embed a YouTube video
Copy the embed URL
On the video, click Share > Embed and copy the URL from the iframe src:
https://www.youtube.com/embed/VIDEOID
Do not paste the watch URL (youtube.com/watch?v=...). YouTube refuses to render the watch page inside iframes; only /embed/ URLs work.
Paste it into the macro
On your Confluence page, type /html, choose Embed a URL / link to this page and paste the embed URL.
Publish the page
Set the Block height (around 500 px gives a comfortable 16:9 player at typical page width), save and publish.
Playlists
Use the playlist embed URL:
https://www.youtube.com/embed/videoseries?list=PLAYLISTID
Good to know
- Privacy-enhanced mode via
youtube-nocookie.comworks too. In restricted CSP mode that host needs a manual rule, because the YouTube template covers*.youtube.comonly. See Content Security Policy. - Restricted CSP mode: ask your Confluence admin to enable the YouTube template.
- Video not loading? See Troubleshooting.
Where to go next
- Integrations & examples: the same pattern for other tools.
Add HTML Macro Pro to Confluence
Securely embed websites and custom code in your Confluence pages.