Phone Camera Orientation Test: Check Camera Rotation

Click Start Camera and rotate your phone on this phone camera orientation test to watch the live Screen Orientation readout. The front facing camera checker needs a quick permission prompt the first time you run it, then gives you a live read-out in seconds.

Camera Orientation Test

Rotate your phone between captures to compare how dimensions change

Your camera feed will appear here
Click Start Camera and allow access when your browser asks.

Live Readout

Updates as you rotate

—Screen Orientation
—Stream Width
—Stream Height
—Display Rotation
—Natural Orientation
—Display Orientation
—Stream Shape
—Stream Matches Screen
—Sensor Orientation Used
—JPEG Rotation
—EXIF Orientation Value
—Preview View
—Preview Transform
—Resolution

Whether these swap when you rotate depends entirely on your phone and browser — both behaviours are normal, which is exactly what this test demonstrates. JPEG rotation is (sensor − display rotation) mod 360 for the back camera and (sensor + display rotation) mod 360 for the front camera; the EXIF value is what a phone would write for that turn.

Captured Comparisons

Rotate your phone and capture in each orientation to compare — nothing is uploaded.

Ever taken a picture that looked fine on your screen and then showed up sideways once you sent it? The phone camera orientation test opens your phone or laptop camera in the browser, reads which way the sensor is mounted and which way you are holding the device, and shows you exactly how the picture will be rotated before you save it. It works on Android, iPhone and desktop webcams, needs no camera app, and explains the EXIF tag that decides how every photo is displayed.

How the Camera Orientation Test Works

A camera never sees the world the way you hold your phone. The sensor always records a landscape-shaped frame, and the operating system rotates that frame afterwards to match the screen. Most camera orientation problems happen in that hand-off between the sensor, the display and the file that gets saved, so the tool checks each step separately: The buying a used phone camera checklist is kept up to date and free to read, with no account or sign-up needed.

  • the width and height of the video stream your browser receives
  • the current angle of the display (0, 90, 180 or 270)
  • whether your device reports itself as held upright or sideways
  • which camera is active, front or back

Put together, those readings tell you whether the problem sits in the hardware, in your settings, or in the way other apps and websites handle the file later. Native camera apps hide most of this from you; the test lays it out in plain numbers, which makes it useful for checking the images from any of your devices, from a phone to a desktop webcam.

Reading the Camera Preview Live

When you press start, the test asks for camera permission and draws the camera preview on the page. Beside the preview it prints the stream size, for example 1920 × 1080, and the screen angle. In Chrome, Edge, Firefox and Safari the stream size flips (1080 × 1920) when the preview follows the device into portrait, so a mismatch between the stream shape and the screen shape is the first clue that something is rotating the wrong way. Most browsers also report the stream resolution, which helps you spot a camera that has dropped to a lower mode after rotating.

Switching Between Portrait Mode and Landscape

Hold your phone vertical in portrait mode, note the reading, then turn it on its side. In landscape orientation the screen angle should change to 90 or 270 and the preview should stay level with the horizon. If the readings never change while you are tilting the phone, auto-rotate is off or the page is locked to portrait orientation. If the angle changes but the preview turns with the phone, the browser is rotating the stream one extra time.

The Four Camera Orientations: 0, 90, 180 and 270 Degrees

Every phone camera works in steps of 90 degrees. There are only four positions, and each one has a matching value in the photo file. The EXIF numbers below come from the EXIF standard itself, so the same table holds for Samsung, Google Pixel and Apple phones. The mobile camera test needs a quick permission prompt the first time you run it, then gives you a live read-out in seconds.

The Four Camera Orientations: 0, 90, 180 and 270 Degrees
Position you hold the phone inCamera angleRotation needed to show it uprightEXIF orientation value
Landscape, top of the phone to the left0None1
Portrait, top up9090° clockwise6
Inverted landscape, top to the right180180°3
Inverted portrait, upside down27090° counterclockwise8

The photo itself is not turned when you shoot. The pixels are stored the way the sensor saw them, and the EXIF value tells the viewer how far to rotate the picture clockwise to make it look upright. That is why images can look right in your gallery and wrong somewhere else: the gallery reads the tag, the other viewer ignores it.

Diagram of a phone held in landscape, portrait, inverted landscape and inverted portrait, with camera angles 0, 90, 180 and 270 and EXIF orientation values 1, 6, 3 and 8
Each of the four camera orientations maps to one EXIF value that tells a viewer how far to turn the stored frame.

Inverted Landscape and Inverted Portrait Positions

The two upside-down positions are where most phones disagree. Many Android phones refuse to rotate the screen to inverted portrait at all, so the screen stays put while the camera angle reaches 270. Inverted landscape works on most models, but you reach it by turning the phone clockwise from portrait, not counterclockwise as you would for normal landscape. Test both: if the screen angle sticks while the preview flips, your photos taken that way will need fixing by hand.

Sensor Orientation, Natural Orientation and Display Rotation

Three numbers decide how a frame from the camera ends up on your screen. Natural orientation is the position the device is designed to be held in: portrait for phones, landscape for laptops, and either way for tablets. Sensor orientation is the angle the image sensor is mounted at, compared with that natural orientation. Display rotation is how far you have turned the device away from its natural orientation right now. The test reads the last two directly and works out the first from the screen shape.

Why the Rear-Facing Camera Sensor Sits Sideways

The sensor always produces a landscape-shaped output buffer, and the Android compatibility rules require its long side to line up with the long edge of the screen. On a phone, whose natural orientation is portrait, that means the rear-facing camera is mounted at a sensor orientation of 90 (sometimes 270), so every frame has to be rotated before you see it. On laptops and Chromebooks the natural orientation is landscape, so the sensor orientation is usually 0. That is why a laptop webcam rarely shows a sideways picture, while a phone depends on software to get it right.

How the Front Camera Changes the Display Orientation

Display rotation is measured counterclockwise from the natural orientation. When you turn your phone, the system rotates the picture the opposite way to cancel out your movement. With the back camera the frame is turned counterclockwise by the display rotation. The front camera looks the other way, so the same correction runs clockwise instead, and the selfie is usually mirrored as well. That mirroring is separate from orientation: flipping left to right never turns a picture sideways. Keep in mind that display orientation only says whether the screen is portrait or landscape; it does not say which way you physically rotated the device.

Phone and Laptop Examples Side by Side

Phone and Laptop Examples Side by Side
ReadingPhone (held upright)Phone (turned sideways)Laptop
Natural orientationPortraitPortraitLandscape
Sensor orientation90900
Display rotation0900
Display orientationPortraitLandscapeLandscape

The sensor orientation never changes; only the display rotation does. A mobile camera that shows the wrong output image while these readings are correct has an app problem, not a hardware one.

JPEG Orientation and the EXIF Orientation Tag

When you take a still photo, the phone has to decide how to save it. It can rotate the pixels before writing the JPEG, or keep them as the sensor delivered them and add a tag. Android camera apps pass a JPEG orientation value with each capture request, and most phones answer it by writing the EXIF orientation tag rather than turning the pixels. That saves processing time, but it means the images only look right in viewers that respect the tag. The test shows you which approach your camera uses.

How EXIF Data Stores the Orientation Attribute

Every photo from a mobile phone camera carries EXIF data: the date, the exposure, the lens, and the orientation attribute. The image data underneath is always the sensor's landscape frame. On a Samsung phone or an iPhone held in portrait, that frame is stored sideways with the value 6, which tells the viewer to turn it 90° clockwise. Strip the tag and viewers have nothing to go on, so they show images as they were stored: on their side.

The Orientation Indicator Formula for Saved Photos

The orientation indicator a camera writes comes from one short calculation. For the back camera:

$$\text{JPEG rotation} = (\text{sensor orientation} - \text{display rotation}) \bmod 360$$

For the front camera the sign changes, because its correction runs the other way:

$$\text{JPEG rotation} = (\text{sensor orientation} + \text{display rotation}) \bmod 360$$

Say you hold your phone upside down to get a lower angle, so the display rotation is 180. With a back sensor at 90, the result is \((90 - 180) \bmod 360 = 270\): the photo must be turned 270° clockwise and gets EXIF value 8. Switch to a front sensor mounted at 270 and the result is \((270 + 180) \bmod 360 = 90\), which is EXIF value 6. The same pose gives two different tags depending on the lens.

Heatmap of JPEG rotation for a back camera with sensor orientation 90 and a front camera with sensor orientation 270 at display rotations 0, 90, 180 and 270, with the upside-down example outlined
The same upside-down pose gives a 270° turn for the back camera and a 90° turn for the front camera.

Checking the Orientation of Photos Before Scanning 42 Receipts

I have 42 paper receipts to photograph for a quarterly expense claim, and the portal only accepts camera uploads from the browser. My phone sits face down on an overhead arm above the desk, and the question is simple: will the shots arrive upright, or will I be rotating 42 files by hand? So before shooting I run the orientation check on this page with everything already in the arm. The answer turns out to be no, not as set up: every receipt would arrive sideways.

With the phone clamped in place, I start the test and read three numbers. The tilt readings are 2.6° and −1.4°, so the phone is almost perfectly flat. The screen angle reads 90, because I clamped it while holding it sideways. The back sensor reports 90. The formula gives a JPEG rotation of (90 − 90) mod 360 = 0, so the shot is saved untouched with EXIF value 1, and the preview confirms it: the receipt sits on its side.

The tilt readout in the test explains the stuck angle, and it is the edge case most people miss. At 2.6° from flat, gravity pulls along the screen with only sin(2.6°) = 4.5% of its full strength, too little to tell which way is up, so the angle the test reports stays at whatever it was when I set it down. I rerun the check with each change in turn:

Checking the Orientation of Photos Before Scanning 42 Receipts
SetupScreen angleJPEG rotationEXIFIn the portal
Clamped while sideways9001Sideways
Rotation locked to portrait first0906Sideways (tag stripped)
Locked, then re-saved in the editor090, written into the pixels1Upright

The second row is the surprise. My gallery shows that shot upright, so the camera orientation is now right, but one test upload comes back sideways: the portal throws away the tag. The EXIF standard defines eight orientation values, and a site that strips them all leaves only the raw pixels.

My call: lock rotation to portrait before the phone goes flat, then batch re-save the 42 shots so the turn is baked in. The input to watch is the screen angle, not the sensor, which never changes. If the tilt reads more than a few degrees off flat, trust the reading; under that, set the rotation yourself.

Why Image Orientation Breaks After You Upload Photos

Most sideways images are not a camera fault at all. The photo leaves your phone with a correct tag, then a website or app removes it. Image orientation then falls back to the raw sensor frame, and every portrait shot appears on its side. The usual places it goes wrong:

  • sites that resize uploaded images and drop their EXIF data on the way
  • chat apps that compress images and strip all metadata for privacy
  • older image editors that save a copy without the tag
  • email clients that show an attachment without reading EXIF

Modern browsers all respect the tag, so a file that looks fine opened directly but wrong once published on a site has almost always lost its EXIF on the server.

Keeping EXIF Orientation When Responsive Images Strip It

If the test shows the right tag on the original file but the published copies are sideways, the site is the cause. Website builders that create responsive images make several smaller copies of your images on upload, and some of them write those copies without the EXIF block. The original shows properly oriented in the editor, then the published images appear in four different directions. Two fixes work: turn off responsive image generation for that picture in the builder's image settings, or rotate the pixels before uploading so no re-orientation is needed. The second is safer, because the photo then sits in a viewable position whether or not anything reads the tag.

Fixing the Orientation of Photos Before You Post

The quickest fix for the orientation of photos you share on forums is to open the picture in your phone's editor, rotate it all the way round once and save it. The editor writes the pixels in their final position and resets the tag to 1, so the picture shows the right way up everywhere. Then confirm the fix the same way you found the problem: open the saved copy on another computer, or rerun the test, and check that the copy, now already rotated, shows the right way up with the tag at 1.

Display Orientation, Viewfinder Size and Aspect Ratio

Getting the angle right is only half of a good preview. The viewfinder, the area of the screen showing the live picture, also has to follow the display orientation and keep the same aspect ratio as the camera stream. If it does not, the stream gets scaled unevenly and faces look squeezed. Apps also pick a stream size equal to or just bigger than the viewfinder, so the picture never has to be enlarged into visible pixels. The test draws the viewfinder at the stream's own ratio, so any stretching you see comes from the camera, not the page.

Matching the Aspect Ratio of the Source

Most phone sensors deliver 4:3 for photos and 16:9 for video. Keeping the viewfinder at the aspect ratio of the source means fitting it inside the screen without changing its shape. Take a phone screen of 393 × 852 points (a ratio of 0.461) showing a 1080 × 1920 portrait stream (0.5625). The screen is narrower than the stream, so the viewfinder takes the full width: 393 points wide and 393 ÷ 0.5625 = 699 points tall, leaving 153 points empty. Filling the whole height instead would need a 479-point-wide picture and clip 86 points, about 18% of the frame. Forcing the stream into the full 393 × 852 box leaves it distorted and stretched. The test fits its own preview this way, so empty bands above and below the picture are expected, while a squeezed face means the app or driver is stretching the stream.

To-scale drawing of a 1080 by 1920 camera preview on a 393 by 852 screen, fitted to the width with 153 points empty or filling the height with 86 points clipped
Fitting the preview keeps the whole frame; filling the screen crops about 18% of it.

Getting Proper Orientation From Your Mobile Phone Camera

Once you run the orientation test, the results point to one of three causes. If the stream shape and the screen agree but saved images are sideways, the file is losing its tag somewhere, so check where you send it. If the preview itself is sideways, the browser or app is ignoring the display rotation. If nothing changes when you turn the phone, auto-rotate is off. An image orientation test on the saved file settles which one it is: open the photo in a browser, and if it shows upright there, your camera did its job.

Rotation Lock and Sideways Previews

On Android, swipe down and check the auto-rotate tile. On iPhone, open Control Center and turn off the portrait lock. Some video call apps fix the preview to one orientation regardless of rotation, so test in the browser first; if the reading changes there, the app is the cause and its own settings are where to look.

Frequently Asked Questions

Why do my photos turn sideways after I upload them?
Your phone usually stores the picture as the sensor's landscape frame and adds an EXIF orientation tag saying how far to turn it. Many websites and chat apps strip that tag when they resize or compress the file, so the viewer shows the frame as stored, on its side.
How does a phone detect its orientation?
An accelerometer measures which way gravity pulls along the screen, and the system rounds that to the nearest of four rotations: 0, 90, 180 or 270. When the phone lies almost flat, gravity barely pulls along the screen, so the phone keeps whatever rotation it had last.
What is sensor orientation?
It is the angle the camera sensor is mounted at compared with the device's natural orientation. Phones are usually 90 for the back camera and 270 for the front camera, because the landscape-shaped sensor has to line up with the long edge of a portrait screen. Laptops are usually 0.
What do the EXIF orientation values 1, 6, 3 and 8 mean?
They tell a viewer how to turn the stored image: 1 means no turn, 6 means 90° clockwise, 3 means 180° and 8 means 90° counterclockwise (270° clockwise).
Why is the front camera result different from the back camera?
The front camera faces you, so the correction for display rotation runs the opposite way: the back camera uses sensor orientation minus display rotation, the front camera uses sensor orientation plus display rotation, both mod 360.
Is my front camera showing how I really look?
Most selfie previews are mirrored left to right, like a bathroom mirror, so text reads backwards. Other people see the natural, unflipped view. Turn off the horizontal flip to see yourself the way the saved photo or a video call shows you.
How do I get my phone to switch from portrait to landscape?
Turn on auto-rotate on Android (quick settings tile) or turn off Portrait Orientation Lock in the iPhone Control Center, then turn the phone on its side while it is upright, not flat.

About the author

Vinitha Pu

Founder and designer

Vinitha Pu is a graphic designer based in Palakkad, Kerala, who builds free, privacy-friendly browser tools. She studied Textile and Apparel Design at Avinashilingam University and completed a C-Tech in Graphic Design at Image Creative Education in 2025. She designs, builds and maintains the camera, microphone and speaker tests and guides on WebcamTest.

  • Content author: Vinitha Pu
  • Fact checked by: Vinitha Pu. Each test is built on the browser's own camera and audio APIs (getUserMedia, MediaRecorder and Web Audio), then tried on real webcams, phones, microphones and speakers before it goes live.
  • Published Updated

Comments & Feedback