Image tools

How to Rotate, Flip or Straighten an Image

How to rotate a photo 90 degrees, flip it into a mirror image, or straighten a tilted horizon - why phone photos show up sideways, which turns are lossless, and what happens to the corners.

6 min readUpdated Sep 26, 2026

A photo that arrives sideways, a selfie that reads backwards, a horizon that runs downhill - three different problems with three different fixes. Sideways needs a quarter turn, backwards needs a flip, and a tilted horizon needs a small rotation by an exact angle. This guide explains each one, why the quarter turn is the only edit that costs nothing, and what happens to the corners when you straighten, with a worked example you can follow in the Rotate Image tool.

Why photos show up sideways in the first place

A phone camera sensor has one fixed orientation. When you shoot in portrait, most phones do not turn the pixels upright; they save them the way the sensor saw them and add a note to the file's EXIF data - the Orientation tag - saying "turn this 90 degrees before showing it". Your gallery app reads the note, so the picture looks right. Software that ignores it - an older photo viewer, some upload forms, a few email clients - shows the raw pixels, and the photo appears on its side.

Current browsers honour the tag, so a photo opened in the tool appears the way your phone shows it. When you download, the picture is redrawn with the rotation built into the pixels themselves and no Orientation tag at all, so it can only be shown one way. If a photo still looks sideways in the tool, the pixels really are sideways, and a quarter turn fixes it for good.

Rotating, flipping and straightening, step by step

  1. Drop a PNG, JPG or WebP onto the Rotate Image tool, or click to choose one. It is read on your device - nothing is uploaded.
  2. Use Rotate left or Rotate right for a quarter turn, or 180 degrees to turn it upside down. Clicks add up, so two rights make 180.
  3. Use Flip horizontal to mirror left and right, or Flip vertical to mirror top and bottom. Flips act on the picture as you currently see it.
  4. For a small correction, drag the angle slider or type an exact value, in steps as fine as 0.1 degrees. Positive is clockwise, negative anticlockwise.
  5. At any angle that is not a multiple of 90, choose Keep whole picture or Crop empty corners.
  6. Check the readout under the preview - it gives the original size, the new size and what was done - then pick PNG or JPG and download. Reset returns to the original.

Quarter turns are lossless

Turning a picture by 90, 180 or 270 degrees does not create or blend a single pixel. Every pixel moves to a new position - the top-left corner of a landscape photo becomes the top-right of the portrait - and the grid simply changes shape, so a 4032x3024 photo becomes exactly 3024x4032. The tool switches image smoothing off for these turns, so the move really is a straight copy, and saving as PNG keeps it bit-for-bit. Flips are the same: a mirror only reorders pixels.

Saving as JPG re-encodes the picture once, at a high quality setting, so the loss is hard to see but real. The tool defaults to JPG only when you started with a JPG, because a photo saved as PNG usually comes out several times larger. If the file is going to be edited again, choose PNG.

Flip versus rotate

Rotating turns the whole picture around its centre; anything written in it stays readable, just at an angle. Flipping mirrors it, and text comes out backwards. That is the tell for a front-camera selfie: many phones save them mirrored, so a sign behind you reads in reverse. A horizontal flip fixes it. Flip vertical is rarer, mostly for reflections.

Flipping both ways at once gives exactly the same result as a 180-degree turn, and a 180-degree turn plus one flip is the same as the other flip on its own. The tool simplifies these combinations as you click, so the readout always describes the result in the fewest steps.

Straightening by a few degrees

A horizon a few degrees off is the most common reason to rotate by something other than 90. Drag the slider until the horizon, a door frame or a wall edge lines up; typical corrections are between 1 and 5 degrees. Unlike a quarter turn, an arbitrary angle does move pixels off the grid, so each output pixel is interpolated from its neighbours. That softens very fine detail slightly - true in every editor - which is a reason to straighten once rather than nudging repeatedly.

A tilted picture no longer fills an upright rectangle, which leaves two options. Keep whole picture grows the canvas until the tilted photo fits inside it, and fills the four triangles it opens up - transparent in a PNG, or white or any colour you choose. Crop empty corners trims instead to the largest upright rectangle that fits entirely inside the tilted photo, so there is nothing to fill. For a photograph the crop is almost always the right call.

A worked example: fixing a 3-degree tilt

Take a 4032x3024 phone photo whose horizon runs 3 degrees downhill to the right. Load it into Rotate Image and type -3 into the angle field, turning it 3 degrees anticlockwise. The horizon levels off.

With Keep whole picture, the canvas grows to 4185x3231. The width is the photo's width projected onto the horizontal plus its height projected onto it: 4032 x cos 3 degrees + 3024 x sin 3 degrees = 4026.5 + 158.3, or 4185 rounded. The height works the same way the other round: 4032 x sin 3 degrees + 3024 x cos 3 degrees = 211.0 + 3019.9, or 3231. The extra pixels are the four slim triangles at the corners.

Switch to Crop empty corners and the output becomes 3889x2824 - still landscape, with no filled corners, keeping about 90% of the original area. At 5 degrees the same photo keeps about 84%, and at 45 degrees only 37.5%, which is why straightening works best on small corrections. Download as JPG, and the photo is straight.

If something looks wrong

  • It turned the wrong way. Rotate right is clockwise and positive angles are clockwise; for the other direction use Rotate left or a negative angle.
  • The corners are black or white instead of see-through. JPG cannot store transparency, so they are filled with the background colour. Choose PNG to keep them transparent.
  • The photo came out a different size. At a tilt, Keep whole picture adds canvas and Crop empty corners removes edge. Only quarter turns keep the pixel count the same.
  • The file is much bigger than the original. You probably saved a photo as PNG. Choose JPG, or run it through the Image Compressor.
  • It needs a tighter frame after rotating. Rotate first, then use Crop Image to choose exactly what stays.

Rotate your image now

Load the picture, turn or flip it until it looks right, and download. Open the Rotate Image tool - free, no sign-up, no watermark, and processed entirely in your own browser.

Frequently asked questions

How do I rotate a picture 90 degrees without losing quality?
Use a quarter turn and save as PNG. Rotating by 90, 180 or 270 degrees only moves pixels to new positions without blending any, so the picture itself is unchanged; the tool turns image smoothing off for these turns so nothing is resampled. Saving as JPG adds one high-quality re-encode, which is usually invisible but not bit-for-bit identical.
Why is my photo sideways on my computer but upright on my phone?
Your phone probably saved the pixels in the sensor's orientation and recorded the correct rotation in the EXIF Orientation tag. The phone reads that tag; the software showing it sideways does not. Rotating the photo and downloading it builds the rotation into the pixels and drops the tag, so it displays the same way everywhere.
How do I mirror an image?
Use Flip horizontal. It swaps left and right, the same as seeing the picture in a mirror - the usual fix for a front-camera selfie with backwards text. Flip vertical mirrors top and bottom instead, and doing both is the same as rotating 180 degrees.