Images
How to Rotate a Picture That Saved Sideways (and Make It Stay That Way)
November 9, 2026 · 8 min read
To rotate a picture that saved sideways and make it stay that way, you have to change two things, not one: the pixels themselves and the small orientation note inside the file. Most people trying to rotate a photo online are fighting the gap between those two, because a gallery app may correct only the note while an upload form reads only the pixels. That is why a photo you already turned the right way up can show sideways again in an email, a web form or on someone else's laptop.
The note is a single EXIF field called Orientation. Most phone cameras write it on every shot; viewers that read it show the photo upright, and viewers that ignore it show the raw sensor frame lying on its side. Once you know how that tag works, the fix becomes predictable: turn the actual pixels, then save a file that no longer depends on the tag.
This guide covers orientation values 1, 3, 6 and 8, how to rotate an image 90 degrees or 180 degrees in a browser, what a custom straightening angle does to the corners, how a flip differs from a rotation, and what the download does to a JPG versus a PNG, using this site's rotate-image tool with its controls named as they appear on screen.
What the EXIF Orientation tag is, and why phones write it
A phone's camera sensor is mounted in one fixed position, almost always landscape. Hold the phone upright for a portrait shot and the sensor still captures a landscape frame with the subject lying on its side. Rather than rotate twelve million pixels, most camera apps write the frame as captured and add one number to the file's EXIF metadata, the Orientation tag, set from the accelerometer as you shoot. It costs nothing and loses nothing.
The tag has eight possible values, but cameras realistically write four; 2, 4, 5 and 7 are mirrored variants that almost never come out of a camera. A phone photo tagged 6 or 8 is sideways on disk and only looks upright because something reads the tag and turns it on the fly. The number tells a viewer how far to turn the stored pixels before showing them:
| Orientation value | How the pixels are stored | What a viewer must do |
|---|---|---|
| 1 | Already upright | Nothing |
| 3 | Upside down | Rotate 180° |
| 6 | On its side, top of the scene at the left | Rotate 90° clockwise |
| 8 | On its side, top of the scene at the right | Rotate 90° counter-clockwise |
Why the same photo is upright in one app and sideways in another
Honoring the tag is optional, and software is split. Your phone gallery, current browsers and most photo managers read it and turn the image before showing it; older desktop viewers, many server-side thumbnail generators and code that reads the pixel grid directly do not. Desktop browsers only began applying the tag to ordinary images in 2020, and image libraries such as Pillow, ImageMagick and sharp still ignore it unless explicitly asked.
The gallery rotate button adds a second trap. Some apps fix a sideways photo by rewriting only the Orientation value; on that phone the problem looks solved, but send the file anywhere that ignores the tag and it is sideways again. Others rotate the pixels and re-save, and you cannot tell from outside which you got.
The fix that holds everywhere does both jobs at once: it rotates the pixels so the top of the scene is physically at the top of the grid, and saves a new file whose orientation does not depend on metadata. A browser tool that draws your photo onto a canvas and exports the result does exactly that: the export contains pixels only, with no EXIF block left to disagree with them.
How to rotate an image 90 degrees or 180 degrees and keep it that way
Drag a JPG, PNG, WEBP or GIF onto the rotate-image tool's Upload an Image box, or click it to pick a file. The photo appears in the Preview panel, and a current browser shows it the way its Orientation tag says, so a correctly tagged phone photo often looks upright before you touch anything.
If it already looks upright in the Preview but keeps arriving sideways elsewhere, do not rotate it; download it as it is. The export is drawn from the pixels you see and written without EXIF data, which bakes the orientation into the image and removes the tag other software was ignoring. The same holds after a 90° fix: the saved file is upright on disk, not upright by instruction.
Two consequences follow. Everything happens inside the browser tab, so the photo is never uploaded anywhere; and because the output is a fresh canvas export, the original's camera model, capture date and GPS location are not carried over. The controls beside the Preview:
- Rotate: 90° Left turns the picture a quarter turn counter-clockwise, 90° Right clockwise, 180° end over end. Each click adds to the last, so two presses of 90° Right equal one 180°.
- Fine Angle: a slider from -180° to 180° with a live readout; buttons and slider drive the same angle, so the readout shows your net rotation.
- Flip: Horizontal and Vertical toggles that stay highlighted while on.
- Download Rotated Image saves the result under the original name with -rotated added, so holiday.jpg becomes holiday-rotated.jpg.
- Reset returns the angle to 0° and switches both flips off but keeps the photo loaded; Remove clears it.
Straightening by a custom angle: what happens to the corners and the canvas
A crooked horizon or a skewed scan needs the Fine Angle slider, not the buttons. Drag right to tilt clockwise and left for counter-clockwise, in whole-degree steps; there is no half-degree setting. The Preview turns the picture inside a fixed box, so after a turn or tilt its edges can run past the visible area; that clipping exists only in the preview, and nothing is cut off in the download.
The download grows the canvas instead. A tilted rectangle needs a bigger rectangle to hold it: the output width is the original width times the cosine of the angle plus the original height times the sine, the height is the mirror of that, and both are rounded to whole pixels. The empty triangles around the photo are filled with whatever the format can express: transparency for PNG and WEBP, solid black for JPG, which has none.
A 90° or 180° turn moves every pixel to a new whole-number position without blending it with its neighbors, so a PNG comes back with the same pixels in new places. Any other angle lands pixels between grid positions and the browser interpolates, softening fine edges very slightly, here and in every other editor. Keep the angle as small as the picture allows, then crop the wedges away for clean edges. This is what a 4000 × 3000 photo becomes at each setting:
| Angle | Output size | Corners |
|---|---|---|
| 90° Left or 90° Right | 3000 × 4000 | None; the frame turns |
| 180° | 4000 × 3000 | None |
| 3° on the slider | 4152 × 3205 | Thin wedges |
| 5° on the slider | 4246 × 3337 | Visible wedges |
| 10° on the slider | 4460 × 3649 | Large wedges |
| 45° on the slider | 4950 × 4950 | Half the canvas is empty |
Flip vs rotate: they are not the same move
Flipping mirrors the picture across an axis; rotating turns it around its center. A sideways photo is a rotation problem: flip it horizontally and it is still sideways, just mirrored. A reversed selfie where a T-shirt slogan reads backwards is a flip problem, fixed by Flip Horizontal; no amount of rotating will un-reverse the letters.
The one place the two overlap is 180°: turning a picture upside down equals flipping it horizontally and vertically together. Flip Vertical alone is not a 180° turn: text still reads left to right but hangs upside down. In the rotate-image tool a flip and a rotation can be active at once; the flips are applied first and the angle second, in both the Preview and the download, so what you see is what you get.
JPG re-encode vs PNG: what the download does to your file
The tool returns the format it was given: JPG in, JPG out, likewise PNG and WEBP; the difference is what re-saving costs. PNG is lossless, so a right-angle turn is a perfect copy. JPG is lossy and every save re-encodes the whole image; here that happens at quality 95, high enough that one generation is invisible at normal viewing size, but still a generation; the file can come out larger or smaller than the original depending on the camera's own compression. WEBP is re-encoded too, at the same quality setting. Rotate once, download once.
For transparent corners rather than black ones on a straightened photo, convert the JPG to PNG first; the wedges can then be left or cropped later, at the cost of a much larger file. A few more limits:
- GIF: the animation does not survive; the export is a single still frame.
- HEIC from an iPhone will not decode in most browsers, so it will not load here; convert it to JPG first.
- One image at a time: if you drop several files, only the first is used.
- No file-size cap of its own; the ceiling is the canvas memory your browser allows, generous on a desktop and tighter on a phone.
Frequently Asked Questions
Your phone saved the photo lying on its side and added an EXIF Orientation tag telling viewers to turn it. The phone gallery obeys the tag; the program on your computer, or the website you uploaded to, read the raw pixels and ignored it. Rotating the pixels and saving a fresh file removes the dependency on the tag, so the photo looks the same everywhere.
The turn itself does not; a 90° or 180° rotation moves pixels without blending them. Saving does cost one JPEG re-encode, at quality 95 in this tool, which is invisible in practice but adds up across repeated saves. The tool saves in the format it was given, so for a bit-perfect result convert the JPG to PNG first and rotate that.
People mean two things by that. If the picture is standing on its side and should be landscape, use 90° Left or 90° Right until it lies flat; that is a rotation. If you want a mirror image, so left becomes right, use Flip Horizontal; that is a flip, and it will not make a sideways photo upright.
No. The download is rebuilt from the canvas and written without EXIF metadata, so the Orientation tag is gone, which is the point, but so are the capture date, camera model and GPS coordinates. If you need that data, rotate in a photo manager that preserves metadata.
Both mean the photo is stored on its side. Value 6 needs a 90° clockwise turn to display correctly, value 8 a 90° counter-clockwise turn; 3 means upside down and 1 already upright. If a copy lost its tag and shows sideways, a value-6 photo needs one press of 90° Right and a value-8 photo one of 90° Left.
Related Tools
The 90° Left, 90° Right, 180°, Fine Angle and Flip controls described above, with a live preview and a same-format download.
crop the black or transparent corners off a straightened photoA Free aspect ratio for trimming the wedges, plus 1:1, 4:5, 9:16 and 16:9 presets if the photo is headed for social media.
convert a JPG to PNG before straightening itSwitch between JPG, PNG and WebP in the browser so a tilted export gets transparent corners instead of black ones.
resize the upright photo to exact pixel dimensionsSet an exact width and height with the aspect ratio locked, once the orientation is right.