How to add transparent video to Squarespace (Safari, Mac and Windows)

To add transparent video to Squarespace, start with one master that has an alpha channel, then export two web versions. At the time of writing (December 2026), I’d use HEVC (H.265) MP4 with alpha for Safari on Mac and for iPhone and iPad, and VP9 WebM with alpha for desktop Chrome, Edge and Firefox.

But getting the video to play was only half the battle. In some browsers, the animation played but had a black background instead of transparency.

That’s fixed by using a small loader to choose which video to serve. There’s a Squarespace Code Block below, but the same principles apply to any website that can run HTML and JavaScript.

Try it: change the background behind the cube

Press play, then switch between Checkerboard and Purple. The actual video file stays the same. If the pattern or colour from the page shows through around the moving cube, your browser is rendering the alpha channel. The line under the player shows which file it was sent.

Press play to see the cube.

More transparent video demos

The cube also has a separate demo with opacity and layer controls. Leave it at 100% opacity and switch between Cube Top and Text Top to see how the video and page text overlap.

The original logo demo shows an earlier version, and the video controller lets you experiment with speed, fades and zoom.

1. Start with a master that actually has transparency

Ask your motion designer for a ProRes 4444 MOV with alpha enabled. The alpha channel tells the browser which pixels are opaque, transparent or somewhere in between. Check the master over a light and a dark background, particularly around shadows, fades and edges. If the background has already been baked in, converting the file to another format won’t remove it. Go back to the animation project and re-export with its background turned off.

Agree the aspect ratio before exporting. On this job the original slot was 1920 × 600. One replacement arrived at 1920 × 1080, which left a lot of dead space and pushed the next section down. Use the same framing in both encodes. If the mobile composition needs a different crop, export both formats again for that crop.

2. Make two web versions from the same master

On a Mac, I used the free Rotato Converter. Drop in the ProRes master and export an HEVC MP4 with alpha and a VP9 WebM with alpha. Keep the ProRes as your master, not as the file you serve to visitors. Apple documents HEVC with alpha, and Chrome documents alpha playback in WebM.

Test the actual output files. An .mp4 extension doesn’t tell you whether it’s HEVC or whether alpha survived the export. And a black rectangle in a desktop media player doesn’t prove the file is opaque. Put the clip over a patterned background in the browser you’ll use to play it.

3. Embed the MP4 and WebM in a Squarespace Code Block

I used a regular HTML video element rather than the native Squarespace Video Block. The point is to keep control of the exact encodes the browser receives and to choose between them explicitly. Use direct file URLs, not sharing or preview links. If you use Squarespace file links, check the upload limit; if your files are too large, host them on a CDN or other static file host that serves the original bytes.

In a Squarespace Code Block, select HTML mode and leave Display Source off. Your site needs a plan that supports JavaScript in Code Blocks. Paste the example below and replace the file paths with your own. It loads one source per visit. The controls are deliberate: they make it easier to test playback and give visitors control of motion.

<video id="alpha-demo" controls muted playsinline preload="none"
       poster="/s/animation-still.png"
       style="display:block;width:100%;height:auto"></video>
<script>
(() => {
  const video = document.getElementById('alpha-demo');
  const ua = navigator.userAgent;
  const isIOS = /iPad|iPhone|iPod/i.test(ua) ||
    (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
  const isSafari = /Safari/i.test(ua) &&
    !/Chrome|Chromium|CriOS|FxiOS|Edg|OPR|Android/i.test(ua);

  video.src = (isIOS || isSafari)
    ? '/s/animation-alpha.mp4'    // HEVC with alpha
    : '/s/animation-alpha.webm';  // VP9 with alpha
})();
</script>

This is a browser-routing rule for a tested set of devices, not a universal alpha detector. For more than one embed, give each player a unique ID or adapt the script to read file paths from data attributes. For a decorative autoplay loop, offer a way to pause it and honour reduced-motion preferences. Keep a still on hand for browsers where the effect doesn’t work.

Why does my transparent video show a black background?

A browser can accept the format and still ignore its alpha channel. In my tests, putting WebM first could give Safari a playable video with an opaque background. Putting MP4 first could send a browser down an equally wrong path. An opaque clip can still play, so waiting for a playback error doesn’t catch it either. That’s why I selected one tested source rather than relying on file order or canPlayType().

Why not just list both files in the video tag?

In the original project, listing both formats let a browser pick a file it could play without necessarily showing its alpha channel. With MP4 first, I saw transparent playback in Safari and Chrome on my Mac and in Firefox on Windows. On that Windows test, Chrome showed a black background and Edge showed no video. Those were observations from the original files and browser setup, not a current compatibility chart. The key test is whether the page shows through after the correct file loads.

4. Check the exports before putting them into the site

I made a small standalone HTML test page so we could test both exports without Squarespace getting in the way. The motion designer could check their own files and the site owner could judge the result before we integrated it.

  1. Put the animation over a checkerboard, contrasting colour or text. Change the background while it plays. You should see the new background through the transparent areas, even where the edges fade.

  2. Test Safari and Chrome on a Mac, Chrome, Edge and Firefox on Windows, Safari on an iPhone or iPad, and Chrome on Android. Use real phones for the mobile check. Note which file loaded, whether it played and whether the background showed through. Those are three separate checks.

  3. If the local file passes but the site version doesn’t, check the selected URL in the browser’s Network panel. Confirm it returns the intended file. Then check the final page on desktop and mobile for empty space, clipped artwork, visible edges and sluggish playback.

Common questions about transparent video on Squarespace

Can I use the native Squarespace Video Block?

No. Squarespace re-encodes videos uploaded to the native Video Block for streaming, and that conversion does not preserve the alpha channel. Host the original HEVC MP4 and VP9 WebM files at direct URLs, then use a Code Block to load the right file without re-encoding it.

Does an MP4 or WebM automatically have transparency?

No. The extension describes the container. You need an alpha-capable encode with alpha actually present: HEVC with alpha in the MP4, or VP9 with alpha in the WebM. Renaming the file or changing its extension won’t add transparency.

Will a transparent video work on Windows?

Use the VP9 WebM with alpha for the Windows setup in this guide, then test it in Chrome, Edge and Firefox. Check the selected file in the Network panel and inspect the edges over a checkerboard. If the clip plays over a solid rectangle, check the source file and the alpha channel separately.

Colin Irwin

I’m Colin Irwin, a freelance Squarespace Designer & Developer based in London, UK, with clients in the USA and around the world.

I’m a recognised Squarespace expert. I design and build Squarespace sites for everyone from charities and start ups to major established brands.

https://www.silvabokis.com
Previous
Previous

Why doesn’t my video background match my Squarespace page?

Next
Next

How Much Does Squarespace Cost? Plans, Fees and Add-ons