Documentation Index

Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt

Use this file to discover all available pages before exploring further.

Image & Video APIs

How do I make a video square or vertical (9:16) for social media?

Last updated: Nov-09-2026

Quick answer
To turn a landscape video into a square or vertical (9:16) video, choose how to handle the leftover space:
  • Crop to fill, keeping the subject in frame: c_fill,g_auto,h_1080,w_1080 (square) or ar_9:16,c_fill,g_auto,w_1080 (9:16).
  • Keep the whole video, with a blurred copy behind it: b_blurred:400:15,c_pad,h_1920,w_1080.

The question

"How do I crop a video to a square?" and "What's the transformation for making a video fit 9:16, with a blurry background filling the rest?"

Social platforms prefer square (1:1) or vertical (9:16) videos, but most source videos are landscape (16:9). You can cut away the sides, or keep the whole video and fill the empty space around it.

The original asset

The examples start with this landscape (16:9) video, 1920x1080:

The solution

Option 1: Crop to fill the frame

The c_fill crop mode resizes the video to the exact size you ask for, and crops away whatever doesn't fit. With g_auto, Cloudinary keeps the most interesting part of the video in the frame, instead of always cutting from the center.

This example crops the video to a 1080x1080 square:


For a vertical 9:16 video, set the aspect ratio with ar_9:16 and give only the width, so that Cloudinary calculates the height (1920):


Notes
  • The first time you request a video with g_auto, Cloudinary needs time to analyze it, and the request returns an HTTP 423 error ("Video tracking-crop is pending") until it's ready. Try again after a short wait, or generate the video in advance with an eager transformation.
  • Cropping always removes part of the video, so it's best when the subject is small enough to fit in the new frame.

Option 2: Keep the whole video, with a blurred background

To avoid cropping, fit the whole video inside the new frame with c_pad, and fill the leftover space with a blurred, enlarged copy of the video itself (b_blurred:400:15). The first number is the blur strength, and the second is the brightness (a lower value darkens the background).

This example places the video in the middle of a 1080x1920 (9:16) frame:


To get a square instead, change the dimensions to h_1080,w_1080.

Note
A blurred background needs both the width and the height. With only an aspect ratio, such as ar_9:16,b_blurred:400:15,c_pad,w_1080, the request returns an HTTP 400 error.

Option 3: Keep the whole video, with a solid color background

Replace b_blurred:400:15 with a color, such as b_rgb:e8a598, to fill the leftover space with a solid color:


Related topics

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars