iformat.io

How to Fix a Sideways Photo From Your Phone (EXIF Rotation Explained)

Updated Sep 30, 2026
3 min read
How to Fix a Sideways Photo From Your Phone (EXIF Rotation Explained)

You upload a photo to a website and it displays sideways. You email a photo to a client and they tell you it's upside down. You add an image to a Google Doc and it appears rotated 90 degrees. But on your phone, the photo looks perfectly fine — right-side up, properly oriented. What's going on?

The answer is EXIF rotation metadata. When you take a photo with your phone, the camera sensor always captures the image in the same orientation: typically landscape. Instead of physically rotating all the pixel data when you hold the phone vertically, the phone writes a small metadata tag that says "display this image rotated 90 degrees clockwise" (or whichever rotation matches how you were holding the phone). Your phone's gallery app reads this tag and rotates the display accordingly. But plenty of other software — older web browsers, certain email clients, image processing scripts, some website upload handlers — ignores the EXIF orientation tag entirely and shows the raw pixel data in its native orientation.

The result: a photo that looks correct on your phone but wrong everywhere else. This problem has been around since smartphone cameras became mainstream, and while most modern software now handles EXIF orientation correctly, enough things still don't that it remains a common frustration.

What EXIF orientation actually is

EXIF (Exchangeable Image File Format) is a metadata standard embedded in JPEG and TIFF files. It stores information about the photo — date taken, camera model, GPS coordinates, exposure settings, focal length, and crucially, orientation. The orientation tag is a single value from 1 to 8 that describes how the image should be rotated and/or mirrored for correct display.

The most common values you'll encounter:

1: No rotation needed. The top of the image is the top. This is what you get when you hold the phone in landscape with the home button on the right.

3: Image is upside down. Needs 180-degree rotation.

6: Image needs 90-degree clockwise rotation. This is the most common for photos taken with the phone held vertically (portrait mode).

8: Image needs 90-degree counter-clockwise rotation. This happens when you hold the phone vertically with the buttons on top.

Values 2, 4, 5, and 7 involve mirroring (horizontal or vertical flip) combined with rotation. These are rare in camera output but can appear when images are processed by certain software.

The phone's accelerometer detects which way the phone is oriented when you press the shutter and writes the corresponding EXIF tag. The actual pixel data stays in the sensor's native orientation. This approach is faster (no pixel manipulation needed at capture time) and preserves the original sensor data, but it creates a dependency on the viewing software to interpret the tag correctly.

How to fix the rotation permanently

The fix is straightforward: apply the EXIF rotation to the actual pixel data so the image is physically oriented correctly regardless of whether the viewing software reads EXIF metadata. After this process, the EXIF orientation tag is set to 1 (normal) because the pixels are now in the correct position and no rotation is needed.

The iFormat image rotator handles this. Upload the sideways photo, and the tool detects the EXIF orientation flag automatically. You can apply the EXIF rotation with a single click, or manually rotate the image if the metadata is missing or incorrect. The output file has the pixels physically rotated and the EXIF tag set to normal, so it displays correctly everywhere.

If your photo is from an iPhone and is in HEIC format, some HEIC-specific rotation issues add an extra layer of complexity. The HEIC to JPG converter handles EXIF rotation during format conversion — it reads the HEIC orientation metadata and applies it to the output JPG, giving you a correctly oriented file in a universally compatible format.

Why this problem still exists

The EXIF orientation standard was established in the early 2000s, and you'd think by now every piece of software would handle it correctly. Most modern software does, Chrome, Firefox, Safari, iOS, Android, Windows 10+, macOS, all read EXIF orientation properly. But the edges are still rough.

Web uploads: When you upload an image to a website, the server-side processing may strip EXIF metadata (for privacy reasons, to remove GPS data) without first applying the rotation. The image gets saved without its orientation tag, and suddenly it's sideways for everyone who views it.

Older software: Windows 7 and earlier didn't reliably read EXIF orientation. Some legacy enterprise systems, internal tools, and specialized software still run on older image libraries that predate EXIF orientation support.

Programming libraries: Developers building image processing pipelines often use libraries that load raw pixel data without automatically applying EXIF transformations. Python's PIL/Pillow, for instance, doesn't auto-rotate by default — you need to explicitly call ImageOps.exif_transpose() to apply the orientation. This means custom web apps, scripts, and tools built without EXIF awareness will display images incorrectly.

Email clients: While Gmail and Outlook handle EXIF orientation correctly in 2026, some corporate email systems with custom webmail interfaces still render images based on raw pixel data.

Preventing the problem before it happens

If you know your photos will be used in a context that might not handle EXIF rotation, you can pre-process them before sharing.

Run all photos through the rotator before uploading. Upload to the image rotator and apply EXIF rotation. This bakes the rotation into the pixel data so the file is self-contained — it doesn't depend on the viewer to interpret metadata correctly.

Use the image converter as a normalisation step. Converting an image through the image converter typically applies the EXIF rotation during conversion, producing a correctly-oriented output regardless of the input format.

Check the EXIF data. On macOS, select a file in Finder and press Cmd+I to see basic info, or open it in Preview and go to Tools → Show Inspector for full EXIF data. On Windows, right-click the file, go to Properties → Details, and look for an Orientation field. If it says anything other than "Normal" or "1," the file relies on EXIF rotation for correct display.

HEIC and EXIF rotation: the double headache

HEIC files from iPhones can have an extra layer of orientation confusion. The HEIC container stores orientation metadata in its own format (HEIF metadata), and when you convert HEIC to JPG, some converters read the HEIC container's orientation but not the embedded EXIF orientation, or vice versa — resulting in images that are rotated incorrectly even after conversion.

The HEIC to JPG conversion guide covers this in detail. The short version: use a converter that properly reads both the HEIC container metadata and the EXIF data and applies the correct transformation to the output file. The iFormat HEIC converter does this, producing JPGs that are physically oriented correctly.

Live Photos add another wrinkle. A Live Photo is stored as a HEIC file containing both a still image and a short video clip. The still image and the video can have different orientation metadata. When you extract just the still image, make sure the extraction process applies the correct orientation for the still frame, not the video orientation.

Check before you send

Before emailing or uploading a photo, open it in a web browser (Chrome or Firefox). Drag the file into a browser tab. If it displays correctly there, it will display correctly on virtually any modern platform. If it's sideways in the browser, fix the rotation before sending. Modern browsers handle EXIF orientation, so if even the browser shows it wrong, the file's pixel data is genuinely rotated and needs a manual fix.

Frequently asked questions

Q: Why does my photo look fine on my phone but sideways on my computer?

Your phone's gallery app reads the EXIF orientation tag and rotates the display automatically. Your computer application might not read that tag, so it shows the raw pixel data in its native orientation, which for portrait photos is sideways. Fix it by applying the rotation to the actual pixels using the image rotator.

Q: Does fixing EXIF rotation change the image quality?

There's a tiny amount of recompression when the file is saved, but at typical quality settings (90+) the difference is invisible. Some tools support lossless JPEG rotation for 90-degree increments, which physically rearranges the DCT blocks without decompressing and recompressing. The visual difference between lossy and lossless rotation at high quality is undetectable to the human eye.

Q: Can I strip all EXIF data instead of fixing rotation?

You can, and it's a common privacy measure (removing GPS location data, camera serial numbers, etc.). But if you strip EXIF without first applying the orientation tag, the image will display sideways on everything. Always apply the rotation to the pixel data before stripping metadata.

Q: My photo is sideways even on my phone. What happened?

If it's sideways on the phone too, the EXIF orientation tag is either missing or wrong. This can happen when the phone's accelerometer glitches during capture (rare), when the image is processed by software that strips or corrupts the tag, or when the photo is a screenshot of a rotated image. Manually rotate it using the rotator tool and save.

Q: Do screenshots have EXIF rotation issues?

No. Screenshots capture the screen exactly as displayed, with the pixel data in the correct orientation. There's no EXIF orientation tag needed because the screenshot is already physically oriented correctly. EXIF rotation issues are specific to camera photos where the sensor captures in a fixed orientation and relies on metadata to indicate how to display the result.

Q: How can I tell which way my phone was held when the photo was taken?

Check the EXIF orientation value. Value 1 means landscape with buttons on the right. Value 6 means portrait with buttons on the bottom (the most common way people hold phones for vertical photos). Value 3 means upside-down landscape. Value 8 means portrait with buttons on top. The selfie flipping guide covers related orientation topics.

Fix Sideways Photos Instantly

Upload a sideways photo and fix the EXIF rotation with one click.

Browse All Posts