You upload a photo and it appears sideways. The file looked fine on your phone. The culprit is the EXIF Orientation tag, a piece of metadata that tells software which way is up. Cameras and phones save raw sensor data in one orientation, then record the intended display angle inside the file. When a website or app ignores that metadata, the photo falls over. Fix it permanently by rewriting the actual pixels so the tag becomes irrelevant.
What the EXIF Orientation Tag Does
The EXIF Orientation tag is a small metadata field embedded in every JPG a modern camera or phone produces. It tells software which way is up. The tag holds a value from 1 to 8. Value 1 means the image is in its normal, intended orientation. Value 3 means flip it 180 degrees. Value 6 means turn it 90 degrees clockwise. Value 8 means turn it 90 degrees counter-clockwise. The remaining values handle mirroring and combined flips.
Your phone stores the raw pixel data in the sensor's native orientation, whatever that was when you pressed the shutter. Then it writes the EXIF Orientation tag to indicate how the image should be displayed. An app that reads the tag turns the image upright automatically. An app that ignores it shows the raw pixels as they are. That is when the photo appears sideways.
Why the Photo Flips When Uploaded
The photo flips because of a mismatch between how your device saved it and how the destination software handles the EXIF Orientation tag. Modern browsers and image viewers respect the tag. They read the value and adjust the display. Many upload systems, content management platforms, and older applications either ignore the tag or strip all metadata during processing.
When an upload system removes the EXIF data without physically turning the pixels, the instruction to reorient the image disappears. The raw pixels stay in the sensor's native orientation. The image appears sideways. This is why a photo that looks correct on your phone shows up wrong on a website.
How to Fix a Sideways JPG
Turn the actual pixel data so it matches the intended orientation, then reset the EXIF Orientation tag to 1 (normal). This bakes the correct orientation into the image itself. Any software that opens the file will see it upright, whether it reads the tag or not.
Re-save in an Image Editor
Most editors apply the EXIF orientation when you open the file. Save it again and the editor writes the turned pixel data and sets the Orientation tag to 1. That is the simplest method. Open the sideways JPG in any editor that respects the tag, then save it as a new JPG. The new file will be upright everywhere.
Use a Lossless JPG Rotator
Avoid recompressing the image. Use a tool like jpegtran, a command-line utility that turns a JPG by 90, 180, or 270 degrees without re-encoding the image data. No quality loss. After the turn, clear the EXIF Orientation tag or set it to 1. Most such tools do this automatically.
Bake the Orientation Into the Pixels
Follow these steps to fix a sideways JPG on your computer. Menu names vary by application, but the process is identical.
- Open the sideways JPG in your image editor. The editor reads the EXIF Orientation tag and displays the image upright.
- If the image still appears sideways in the editor, manually turn it using the rotate tool until it looks correct.
- Save the image as a new JPG file. Do not overwrite the original unless you are certain. Saving re-encodes the image with the corrected pixel data and resets the Orientation tag to 1.
- Upload the new file. It will appear upright in any system, even one that strips EXIF metadata.
For a command-line approach with jpegtran installed, turn the image losslessly. A 90-degree clockwise turn uses the command jpegtran -rotate 90 input.jpg > output.jpg. Use -rotate 180 or -rotate 270 for other angles.
Prevent the Problem Before it Starts
Check whether your camera or phone offers a setting to save images with the orientation already baked into the pixels. Look for an option labelled auto-rotate or always save upright. Enable it and the device sets the EXIF Orientation tag to 1 from the start.
Before uploading, batch-process your images in an editor to strip the EXIF Orientation tag and re-save with the correct pixel orientation. Many photo management tools handle an entire folder at once. If you control the upload system, configure it to respect the EXIF Orientation tag or to apply the turn during processing. That option is not available to most users.
What to Do Without an Image Editor
Some online converters read the EXIF Orientation tag and output a corrected file. Any online service will recompress the image, which may reduce quality if done repeatedly. Your phone's built-in photo editor can turn the image and save a copy. The saved copy has the orientation baked into the pixels. Upload that copy.
If the image sits on a website you do not control, you cannot fix it from your side. Contact the site administrator and supply a corrected version of the file.
A Quick Online Fix at Jpgoo.net
Visit jpgoo.net for a fast way to fix a sideways JPG without installing software. The site offers tools for converting and processing JPG files, including handling orientation issues. Upload your sideways image and the tool outputs a corrected version with the orientation baked into the pixels. Use it when you are away from your usual editing programs.