Image Flip and Rotate - Fix Sideways & Mirrored Photos
Image Flip and Rotate
Operations apply in the order you click them, and you can undo one at a time. Rotating by an odd multiple of 90 degrees swaps width and height, because the image ends up on its side. The file is decoded and redrawn entirely in your browser and never leaves the page.
What Is
A raster image has no sense of up. What a JPEG, PNG or WebP file actually holds is a rectangular grid of colour values with a width and a height, plus whatever the encoder chose to record alongside it. Nothing in that grid says which way is north, and two files with identical pixel values look identical no matter how you hold the screen. Orientation therefore has to be expressed as a separate instruction, and there are two fundamentally different places to put that instruction. The first is at render time: the viewer is told to apply a transform matrix as it draws the image, the stored pixels stay exactly as the camera wrote them, and the rotation is recomputed every time the picture is opened. The second is inside the pixel data itself: the grid is transposed, rows and columns are exchanged, and what results is a different set of numbers that needs no instruction at all to display correctly. That baked-in version is what every image editor produces when you commit a rotation, and it is what makes the picture look right in software that knows nothing about metadata. That is also why turning an image by an odd multiple of ninety degrees changes its dimensions. A quarter turn maps the horizontal axis onto the vertical axis and the vertical axis onto the negative horizontal axis, so the four corners travel to positions that no longer fit the original rectangle. A 4000 by 3000 photograph becomes 3000 by 4000 after a single right-angle turn, while 180 degrees leaves the shape untouched because that rotation is symmetric about the centre.
Two quarter turns swap the axes twice and land back on the original width and height. Digital cameras complicate this further because the sensor is almost always mounted in landscape orientation no matter which way you hold the body. Point the camera upright and the sensor still reads the scene sideways relative to the scene, and instead of paying for a buffer and a rotation on every frame, cameras store the rotated grid and write a single tag into the EXIF metadata block telling readers which way to turn it. The EXIF orientation tag has eight legal values: one and eight keep the stored order, three and six are half turns, and the odd values mean a quarter turn combined with a mirror. Modern phones and most editing software honour that tag, which is exactly why the same photo looks upright on your own device and sideways in an upload form, a mail client or a printer driver that ignores it. Editing the pixels destroys the tag's meaning: once you rotate the grid yourself the old instruction is still present, telling compliant readers to turn your corrected result again, and a well-behaved viewer will dutifully undo your work. Browsers and this tool side-step the issue by not embedding EXIF in the output at all, which is usually what you want for a fixed picture but worth knowing if you depend on camera coordinates, GPS tags or a capture timestamp surviving the edit. Re-encoding is the other half of the operation. PNG stores every pixel value it is handed, so a rotate or flip is lossless there: the file gets larger, loads more slowly, and is visually identical to a rotated view of the original. WebP can be configured either way, with a lossless mode that behaves like PNG and a lossy mode that trades fidelity for size.
JPEG has no lossless mode at all; its transform and quantisation pipeline discards information the eye is unlikely to notice, which is why a JPEG that is rotated and saved again is very slightly softer and very slightly different in colour than the first save. Every decode and encode cycle costs a little, so keeping the same format beats converting to another one. Colour management makes that cost visible. Cameras record colour in one space, usually sRGB, and JPEG files may additionally carry an ICC profile describing a different space such as Adobe RGB or Display P3. When such a file is decoded and drawn to a canvas without that profile being honoured, the browser assumes sRGB, and when it re-encodes it writes out what it believes the values to be. If the original values were not sRGB to begin with, the conversion is applied once and the colours drift: skin tones warm slightly, saturated blues and greens shift. Rotating a PNG is completely safe because the numbers are copied verbatim. Rotating a JPEG can shift colour slightly on the round trip, and rotating a wide-gamut JPEG without handling its profile can shift it more than you would expect.
How to Use
- Open the Image Flip and Rotate tool in your browser. Decoding and redrawing happen locally, so nothing is uploaded and your file never leaves the device.
- Click the Choose an image file input and select the picture you want to correct. Any format the browser can decode is accepted, including PNG, JPEG, WebP and GIF.
- If decoding fails you get a message under the file picker instead of a preview, which means the file is not an image this browser can read.
- Press Rotate 90, Rotate 180 or Rotate 270 to turn the picture, or Flip horizontal and Flip vertical to mirror it. Each press appends to the chain rather than replacing it.
- Watch the canvas preview redraw after every press, and read the line below it: it shows the current width by height in pixels followed by the operations in the order you applied them.
- Notice when the numbers swap. One 90 or 270 degree turn changes a landscape 4000 by 3000 image into 3000 by 4000, which is the correct behaviour rather than a bug.
- If a press was wrong, click Undo last to peel off only the most recent step, or click Reset to drop the entire chain and return to the untouched original.
- Click Download to save the result. The file name records the operations that were applied and the original format is kept, so a corrected JPEG is written back as a JPEG.
- Open the saved file once in a viewer or a print preview to confirm the orientation stuck, especially if it is destined for a system that ignores EXIF orientation.
Examples
Input: Phone photo of a portrait, stored 4032 × 3024 lying on its side
Process:
Press Rotate 90 — one quarter turn swaps the axesResult: 3024 × 4032 px portrait, upright in every viewer, EXIF dropped
Input: Selfie saved by a mirroring app, 1080 × 1920
Process:
Press Flip horizontal — width and height unchangedResult: 1080 × 1920 px with text and logos reading the correct way round
Input: Flatbed scan of a receipt fed in the wrong way, 1654 × 2339
Process:
Press Rotate 180 — half turn is symmetric about the centreResult: 1654 × 2339 px, text upright, dimensions identical to the original
Input: Newspaper clipping with a mirrored caption, 3000 × 2000
Process:
Rotate 270, then Flip horizontal — two operations in one chainResult: 2000 × 3000 px, correct orientation and corrected mirror, undo step by step
Related Searches
People also search for: image flip and rotate, rotate image online, flip image free, mirror image horizontally, flip image vertically, rotate jpeg.
image flip and rotaterotate image onlineflip image freemirror image horizontallyflip image verticallyrotate jpegfix sideways photorotate picture in browserturn image 90 degreesflip selfieupside down photo fixscan orientation fiximage rotate and downloadrotate without quality lossreverse image left to rightimage orientation toolno upload image editorrotate photo in browser
Frequently Asked Questions
Does rotating or flipping an image reduce its quality?
It depends entirely on the format, because a rotation only relocates pixels and never resamples them, so no new detail is created or thrown away by the turn itself. Saving as PNG is lossless: the grid is copied verbatim into the new file and the result is identical to a rotated view of the original. WebP can go either way, because it offers a lossless mode and a lossy mode, and browsers normally pick the lossy one when encoding canvas output. JPEG is always lossy, since its pipeline quantises and discards information the eye is unlikely to notice, so a JPEG that is decoded and written back is very slightly softer than the one you started with. The cure is simple: keep the format you already had, and prefer PNG whenever the file has to survive many further edits.
Why does rotating by 90 degrees swap the width and the height?
Because a quarter turn is not a shape-preserving operation in the way a 180 degree turn is. Rotating 90 degrees maps the horizontal axis onto the vertical axis and the vertical axis onto the negative horizontal axis, so the corner that was at the far left of the top edge ends up at the far right of the side edge. The picture is no longer able to fit inside the original rectangle, so its aspect ratio relative to the screen has changed sides and the dimensions are exchanged: 4000 by 3000 becomes 3000 by 4000. A 180 degree rotation, by contrast, is symmetric about the centre of the image and returns each corner to the opposite corner of the same rectangle, which is why the numbers stay put. Two quarter turns swap the axes twice and restore the original width and height.
What happens to my EXIF data, GPS location and capture date?
They do not survive as metadata in the output this tool produces. Cameras record the scene in the orientation the sensor is mounted in and store the intended viewing angle separately in an EXIF orientation tag, which is why a photo can look upright in one program and sideways in another. When pixels are edited directly, that stored instruction becomes wrong rather than disappearing, so a viewer that trusts it will rotate your corrected image back into the sideways version you were trying to remove. Baking the new orientation into the grid and dropping the EXIF block avoids the contradiction entirely, and it is the safer choice for anything you are about to send elsewhere. The trade-off is that camera coordinates, GPS tags, the capture timestamp, the camera model and any copyright field go with it, so keep your original file if you intend to keep that information.
Does the order in which I click the buttons change the result?
Yes, and that is deliberate rather than a limitation. The buttons append operations to a chain instead of merging them into a single angle, because rotation and mirroring do not commute. Pressing Rotate 90 and then Flip horizontal gives a different picture from pressing Flip horizontal and then Rotate 90, and a tool that silently combined them would occasionally hand you the wrong one of the two. Keeping the order visible in the operations readout underneath the preview means you can always see exactly what produced the image on screen. Undo last removes one step at a time from the end of that chain, so you can back out of a mistaken press without discarding the earlier ones, and Reset clears the whole chain back to the decoded original.
Can I use this on transparent PNGs, screenshots and scanned text?
Yes to all three. Transparency survives because the tool redraws through a canvas that keeps an alpha channel, so a logo on a transparent background stays transparent instead of gaining a white box, and a screenshot keeps its crisp edges because no scaling takes place. Scanned documents and receipts are the case people use this for most often, and rotating them so the lines of text run the right way is exactly what the buttons are for. For a scan, prefer PNG if you have the choice, since text edges in a lossy format can pick up ringing artefacts that survive every future re-save. Note that a genuinely crooked scan still needs a few degrees of correction, which these buttons cannot do because they only turn in ninety-degree steps.
Is my image uploaded to a server when I rotate it?
No. The file is read with the browser's own file API, decoded into an in-memory canvas, transformed and re-encoded before being handed to a download, and those bytes never travel to a remote machine. That matters more than it sounds for the images people actually bring to this tool: scans of passports and driving licences, medical images, photographs of children, screenshots of internal dashboards, unreleased product photos and anything under a non-disclosure agreement. An upload-based service exposes all of that to whoever operates it, whatever its privacy page claims about deletion afterwards. Because the tool also drops EXIF, a rotation doubles as a small privacy cleanup: no GPS coordinates and no camera identifiers travel with the corrected copy.