Rotating, straightening and flipping a photo
How to turn a photo by 90 or 180 degrees, straighten a tilted one by any angle, or flip it like a mirror, and why photos sometimes open sideways in the first place.
Last reviewed · 997 words
In short
- Left 90°, Right 90° and 180° turn the photo in quarter turns; nothing is lost and the picture just swaps width and height.
- The angle slider straightens by any amount from −180° to 180° in half-degree steps; the picture grows so no corner is cut off, and the new corners are filled white, black or left transparent.
- Flip left–right mirrors the photo, which fixes reversed text in a selfie; Flip upside down mirrors it top to bottom.
- Phones often store photos sideways with a note saying which way is up. The tool reads that note, so the photo starts upright and the saved copy is upright everywhere.
- The photo is changed in your browser and never uploaded.
A photo that looked right on the phone arrives sideways on the computer. A document photographed on a desk is tilted a few degrees. A selfie shows the shop sign behind you written backwards. Each of these is fixed by turning or flipping the picture, and each has a slightly different cause. This page explains how to fix them here and what happens to the photo when you do.
How to rotate a photo here
Choose a photo; JPG, PNG and WebP all work. The turned photo appears in the result panel straight away, with its size and a Download button.
- Left 90° and Right 90° turn the photo a quarter turn anticlockwise or clockwise.
- 180° turns it upside down.
- Flip left–right mirrors it, as if seen in a mirror.
- Flip upside down mirrors it top to bottom.
- The angle slider turns it by any amount between −180° and 180°, in half-degree steps; the −0.5° and +0.5° buttons nudge it.
- Reset returns the photo to how it opened.
Turns and flips combine: you can turn a photo right and mirror it at the same time. The saved file is named after the original with rotated-90, rotated-180 or flipped added.
Quarter turns lose nothing
Turning by 90, 180 or 270 degrees moves every pixel to a new place without changing it. A 4,000 × 3,000 photo turned 90° becomes 3,000 × 4,000, with exactly the same pixels. PNG and WebP pictures are saved as lossless PNG, so they come out identical apart from the turn. JPG photos are saved as JPG again at 92% quality; that re-encoding discards a little detail, which is not visible at that quality, but it is a reason to turn the original rather than a copy that has already been edited several times.
Straightening by any angle
A photo of a page taken at a slight angle, or a horizon that leans, needs a turn of a few degrees. The picture cannot stay the same size when turned by an angle that is not a right angle: its corners would stick out past the edges. Rather than cut them off, the tool makes the picture just big enough to hold the whole turned photo.
The new size follows from the angle. For a photo of width w and height h turned by angle θ, the new width is w × |cos θ| + h × |sin θ| and the new height is w × |sin θ| + h × |cos θ|, rounded up to whole pixels:
| 4,000 × 3,000 photo turned by | New size |
|---|---|
| 5° | 4,247 × 3,338 pixels |
| 10° | 4,461 × 3,650 pixels |
| 45° | 4,950 × 4,950 pixels |
| 90° | 3,000 × 4,000 pixels |
The four new triangles in the corners are filled with the colour you choose under Corners: white, black, or transparent for PNG pictures, since JPG has no transparency. To get a clean rectangle again, crop the straightened photo with the crop image tool, keeping inside the corners.
To straighten well, watch a line that should be level or upright, such as the edge of a page, a door frame or the horizon, and nudge the angle until it is. Half a degree is enough to notice on a long straight edge.
Turning by an angle that is not a right angle redraws the pixels, because each new pixel falls between old ones and has to be worked out from its neighbours. The browser does this with high-quality smoothing, so the result is clean, but it is very slightly softer than the original. A right-angle turn has no such cost.
Flipping and mirrored selfies
Many phones show the front camera like a mirror, so moving your right hand moves the hand on the right of the screen. Some also save the photo that way, mirrored, which is why a T-shirt slogan or a sign in a selfie can read backwards. Flip left–right reverses it, and the writing reads correctly again.
Flipping is a mirror, not a turn: no amount of turning makes a mirrored photo read correctly. Flip upside down is the same mirror, top to bottom; combined with 180° it gives the same result as flipping left to right.
Why photos open sideways
A phone's camera sensor has one fixed orientation. When you hold the phone upright, many phones save the picture as the sensor saw it and add a note to the file, the Exif Orientation tag described in the CIPA DC-008 standard, saying how to turn it for display. Gallery apps and modern browsers read the note and show the photo upright. Some older programs, some upload forms and some printers ignore it, and show the photo as stored, on its side.
This tool opens photos the way current browsers do, applying the note, so the photo appears upright here. When you save, the turn is applied to the pixels themselves and the note is not carried over, so the saved copy is upright in every program, whether or not it reads Exif. If a form shows your photo sideways, opening it here and downloading it unchanged, or after any edit, is often all it takes.
Common problems
The photo is upright here but sideways on the form. The form is probably showing the photo as stored and ignoring its orientation note. Download it from this page, even without turning it, and upload that copy: its pixels are stored upright, so it shows correctly everywhere.
There are white triangles in the corners. The photo was turned by an angle that is not a right angle, and the corners were filled. Crop them away with the crop image tool, or choose Black or Transparent under Corners.
Text in the photo reads backwards. It was mirrored, usually by a front camera. Use Flip left–right; turning cannot fix a mirror image.
The file got bigger. Straightening makes the picture slightly larger to fit the corners, and a PNG of a photo is larger than a JPG. If a form sets a size limit, use the image resizer in KB afterwards.