Rotate a video

A phone clip that plays sideways usually carries a rotation flag, not rotated pixels. This rewrites the frames so the orientation is baked in.

How Rotate Video works

The file is read with a FileReader, rewritten in memory and offered as a download. This is why large PDFs are limited by your device's RAM rather than by an upload size limit. A 200 MB scan never crosses the network, so the slowest part is your own disk.

That is the whole architecture: static files, one script, no upload endpoint to leak or log. Close the tab and the work is gone.

The sideways video problem

Phones record landscape video but store it with a rotation flag so a portrait-held phone shows it upright. Desktop players and social uploaders disagree about whether to honour that flag, which is why the same file looks right on your phone and wrong on a laptop.

Re-encoding the frames removes the doubt: after a 90° transpose, the pixels themselves are rotated and the flag is no longer needed.

Rotate, transpose, flip

A 90° turn is a transpose: rows become columns. 180° is two transposes in a row, which is identical to flipping both axes. A mirror is different — hflip reverses left and right without turning the frame, which is what you want for a selfie that reads backwards.

One catch: H.264 requires even width and height, so a rotated odd-sized frame is rounded down by one pixel. That one-pixel change is invisible but prevents a broken encode.

ActionEffect
90° clockwiseWidth and height swap
90° anticlockwiseWidth and height swap, other direction
180°Same shape, upside down
Flip H / VMirror, shape unchanged

Why it re-encodes

Rotation changes the frame geometry, and a compressed stream cannot be reshaped without decoding. The clip is decoded, each frame is transformed, and the result is encoded again at CRF 23.

That also means rotation is the point to fix anything else wrong with the clip: crop it, speed it up, or burn subtitles in the same pass — each tool here does one job, so run them one after another and the quality only degrades once per pass.

Good to know

  • Works offline once loaded, including on flights and in locked-down networks.
  • No file size limit beyond your device's own memory.
  • Free to use, with no account and no usage counter.
  • Results are produced locally, so they are not logged or shared with anyone.

Questions

Why does my video look sideways on one device only?

The file has a rotation flag that some players honour and others ignore. Re-encoding the frames removes the ambiguity.

Will the resolution change?

A 90° turn swaps width and height. Dimensions are rounded to even numbers because H.264 requires it.

Does flipping also mirror the text in the video?

Yes — a mirror flips everything in the frame, including captions and logos.

How long does it take?

A one-minute 720p clip takes about one to three minutes in the browser.

Video and audio tools

Keep going

More files tools