This page's code did not start.

Opening index.html directly from a folder blocks JavaScript modules, so nothing will happen when you choose a video. Serve the folder over http instead:

powershell -ExecutionPolicy Bypass -File serve.ps1

Then open http://localhost:8080/.

Video Rotator

A quarter turn, a half turn, the other way. With header rotation, the picture frames stay unchanged.

Language: English
View source
Your videos are processed in your browser. No processing upload.

The video you choose is read, given a new header and written again in memory on this machine, by code served from this address; if you ask for the turn to be baked in, your own browser's codecs do the drawing. Nothing here can make an upload, and there is no server on the other end of this page to receive one. A gigabyte never goes up to come back turned.

Live check: checking…

Offline: checking…

Don't take our word for it: open DevTools, watch the Network tab, and turn something. Not one request carries a video, a frame, or a filename. Or unplug from the internet and turn it anyway.

1 Choose the video

2 Turn it

A phone that filmed sideways did not turn its pixels: it wrote a quarter turn into the file's header, and the player applies it. With header rotation, this page changes that matrix and copies the picture frames unchanged. Sound is copied, encoded as AAC or left out.

Bake the turn into the picture Draw every frame turned and encode it again as H.264, for the few old desktop players that ignore the header. Costs a generation of quality and takes as long as an encode; leave it off unless a player has shown you the clip sideways.

3 Rotate it

View as Markdown

How to rotate a video

  1. Choose the video. One file at a time: MP4, MOV, M4V, WebM or MKV. It is read straight off your disk by the browser, and the page says what it is and which way up it is shown at the moment.
  2. Pick the turn, and look at the preview. A quarter turn right, a quarter turn left, or upside down. The first frame is drawn turned as chosen through the same arithmetic the file will carry, so what you see is what a player will do. Tick “bake” only if a player has shown you the clip sideways; leave the sound out if you would rather the clip went silent.
  3. Rotate it, and read the line that says it was checked. The header is written and every frame copied across, which takes seconds; a bake takes as long as an encode, with a bar that says where it is. Then the finished file is opened again here and has to be the length it was, shown the way you asked, and carrying its sound. It plays from memory under the download, so you can see it the right way up.

The longer version

How to rotate a video without losing quality Why a phone clip plays sideways, what the nine numbers in its header do, why most rotators re-encode for nothing, when to bake the turn in instead, and how to turn a video in your browser without uploading it.

Questions

Does rotating lose quality?

Header rotation keeps picture quality unchanged: each picture frame is copied byte for byte. Only baking the turn re-encodes the picture. AAC sound is copied; other decodable sound is encoded as AAC, unless it is omitted. File size stays almost the same when sound is copied too.

Why does the file still look sideways in one player?

Because that player ignores the display matrix. Every phone, browser, modern player and editor honours it; a few old desktop players do not, and show the frames as stored. Tick “bake the turn into the picture” and the frames themselves are turned and encoded again as H.264, which every player shows the same way at the cost of a generation of quality.

Which way is a quarter turn right?

Clockwise, the way the top of the picture would move if you turned your phone to the right. The preview shows the first frame turned as chosen, so pick the button that makes it look right and press the big one.

Which files does it read?

MP4, MOV and M4V with any picture inside, because a turn written into the header does not care what the frames are. WebM and MKV, where H.264 frames are copied and anything else is baked in, since an MP4 header can be built round nothing else. AAC sound is copied; Opus, Vorbis, MP3 and FLAC are encoded again as AAC; sound the browser cannot decode is named and left out. The result is always an MP4.

How long does it take?

Seconds, for the ordinary turn: the file is read once for its layout and once more as the browser writes the result out, and a gigabyte goes at the speed of your disk. Baking the turn in takes as long as your machine takes to encode the clip — with a hardware encoder, most laptops and every recent phone, faster than the clip is long; without one, slower.

Are my videos uploaded anywhere?

No. The file is read, given a new header and written again by your own browser on your own hardware, and the page's Content-Security-Policy names every address it may contact — none of them belongs to this site. The simplest way to satisfy yourself is to unplug from the network and use the page anyway. On a tool for files this size, that is also the fastest way: the upload is longer than the whole job.

Does it work on a phone?

Yes. Header rotation copies picture frames without decoding them; sound may need AAC encoding. The finished file is held in memory until you save it, and a phone will usually hold a few hundred megabytes of result. Baking the turn also needs picture encoding, which a phone's hardware encoder can accelerate.

Is there a size limit, and does it cost anything?

The file is read from your disk in pieces, so a file larger than your memory is fine going in; the finished file is held in memory until you download it, and an MP4 written here cannot be over 4 GB. It is free, there is no account, no sign-in and no trial. The site carries advertising, which is what pays for it; the ads are not given anything about your videos.

Does it work offline?

Yes. Load the page once, then disconnect from the internet and it keeps working. That is also the simplest way to prove nothing is being uploaded: a tool that sent your video away to be turned would stop the moment you unplugged.