Converted photos come out sideways
The photo looks right on the phone and wrong everywhere else. The cause is a single number stored in the file that some software honours and some ignores.
The orientation flag, explained
Phone cameras do not rotate pixels when you turn the phone. They always store the sensor's native landscape grid and write a small EXIF tag — Orientation, a value from 1 to 8 — that says how the viewer should rotate it before displaying.
| Value | Meaning | Typical shot |
|---|---|---|
| 1 | No rotation needed | Held normally, landscape |
| 3 | Rotate 180° | Held upside down |
| 6 | Rotate 90° clockwise | Portrait, most common |
| 8 | Rotate 90° anticlockwise | Portrait, rotated the other way |
Software that reads the tag shows the photo correctly. Software that ignores it shows the raw sensor data, which is your portrait photo lying on its side. Nothing is wrong with the file — two programs are simply disagreeing about whether to obey an instruction.
Why conversion is where it goes wrong
A converter has to make a choice: physically rotate the pixels and write orientation 1, or copy the pixels unrotated and carry the tag across. Problems arise when it does neither properly — rotating the pixels and preserving the original tag, so a compliant viewer rotates it a second time and the photo ends up 180° out.
The converters on this site apply the rotation to the pixels and write no orientation tag, which means the image is correct in every viewer including ones that ignore EXIF entirely.
Fixing photos that are already wrong
- One or two files
Open in any editor, rotate, and save. On Windows, the Photos app has rotate buttons; on macOS, Preview responds to ⌘+R. Rotating a JPG in most modern editors is lossless because it operates on whole 8×8 blocks.
- A whole folder, all wrong the same way
Select everything in File Explorer or Finder and use the rotate command once. Both apply it to the entire selection.
- A folder with mixed orientations
Use exiftool to apply each file's own tag:
exiftool -ext jpg "-Orientation<Orientation" -overwrite_original .Or with ImageMagick, which bakes the rotation into the pixels:
mogrify -auto-orient *.jpg
The one to watch for. If a photo is exactly 180° out rather than 90°, it has almost certainly been rotated twice — once by the converter and once by the viewer honouring a tag that should have been cleared. Rotating it back by hand is fine, but if a whole batch behaves this way, the converter is the culprit and re-converting with a different tool is faster than fixing them all.
Common questions
- Why are my converted photos sideways?
- The EXIF orientation flag was not applied during conversion. Phone cameras store pixels in the sensor's landscape orientation and record a rotation instruction separately; software that ignores that instruction displays the raw, unrotated image.
- How do I fix rotation for a whole folder at once?
- ImageMagick's mogrify with the auto-orient option rewrites each file according to its own tag, so mixed orientations are all corrected in one pass. Selecting everything and using the file manager's rotate command works when they are all wrong the same way.
- Does rotating a JPG lose quality?
- Rotating by exact multiples of 90 degrees is lossless in most modern editors, because JPEG's 8×8 blocks can be rearranged without re-encoding. Arbitrary angles do require a re-encode.
- Why is my photo upside down rather than sideways?
- It has been rotated twice — once by the converter baking the rotation into the pixels, and again by a viewer honouring an orientation tag that should have been reset to 1.