๐ Image Rotate and Flip Tool
By Shihab Mia ยท Updated 2026-07-31
PNG, JPEG, WebP, GIF or BMP. Files stay on your device, nothing is uploaded.
Transform
Original
Result
Choose an image to begin. All processing happens locally in your browser.
This image rotate and flip tool turns and mirrors any picture right in your browser. Upload a photo, then rotate it 90 degrees left or right, spin it 180 degrees, or flip it horizontally or vertically. The preview updates with every click and you can download the result as PNG, JPEG, or WebP. Nothing is sent to a server: the whole process happens on your own device, so it works even with private or sensitive photos.
What is the Image Rotate and Flip?
Rotating and flipping are the two most common fixes a photo needs before it is ready to share or print. A rotation turns the whole image around its centre by a fixed angle, so a sideways phone photo becomes upright. A flip (also called a mirror) reflects the image across an axis, swapping left and right or top and bottom without changing the orientation of the frame. They look similar at a glance but produce different results: rotating 180 degrees is not the same as flipping, because a flip reverses the content like a mirror while a rotation does not.
Under the hood this tool uses an HTML canvas. When you press a button, the canvas origin is moved to the centre of the output area, the drawing context is rotated by the chosen angle, and a horizontal or vertical scale of negative one is applied for each flip. The original image is then drawn centred on that transformed origin. For a quarter turn (90 or 270 degrees) the output width and height swap, so a 1200 by 800 landscape photo becomes 800 by 1200 in portrait. The finished canvas is exported with the toBlob method, which gives you a real image file to download.
Many phone photos need rotating even though they look correct on the phone itself. Cameras usually save the sensor data in one fixed landscape orientation and add an EXIF orientation tag that tells a viewer how to display it. Most browsers, photo apps, and social platforms read that tag and rotate the preview automatically, but some older viewers, document scanners, PDF converters, and content management systems ignore it and show the photo sideways or upside down. When that happens the pixel data itself is still in the original orientation, so rotating it with a tool like this bakes the correct orientation into the pixels rather than relying on a metadata flag that not every app respects.
Rotating and flipping can also be combined for effects that neither operation produces alone. Flipping horizontally and then flipping vertically gives the same visual result as rotating 180 degrees, but a single flip can never substitute for a 90 degree rotation, because a flip never swaps the width and height the way a quarter turn does. This tool applies each transform one step at a time so you can stack operations and watch the preview change, undoing a step if the result is not what you expected.
Because everything runs locally with the browser FileReader and canvas, your photo never leaves your computer. That makes the tool fast, private, and usable offline once the page has loaded. JPEG output cannot store transparency, so the tool paints a white background behind transparent areas when you export as JPEG. If you need to keep transparency, choose PNG or WebP instead. Re-exporting through the canvas also strips EXIF and GPS metadata from the original file, which is a welcome side effect if you want to remove location data before sharing a photo.
When to use it
- Straightening a phone photo that came out sideways because the camera was held in portrait.
- Mirroring a selfie so text in the background reads the right way round.
- Rotating a scanned document or receipt that was fed into the scanner upside down.
- Flipping a product shot to face the other direction for a balanced layout or collage.
- Correcting a photo that an older app, scanner tool, or CMS displays sideways because it ignores the EXIF orientation tag.
- Preparing an image for a print template, ad slot, or thumbnail that requires an exact landscape or portrait orientation.
How to use the Image Rotate and Flip
- Choose an image from your device using the file picker.
- Press Rotate left or Rotate right to turn the photo 90 degrees, or Rotate 180 to spin it halfway.
- Press Flip horizontal or Flip vertical to mirror the image across an axis.
- Combine steps if needed, for example rotate first, then flip, checking the preview after each click.
- Pick an output format (PNG, JPEG, or WebP) and adjust quality if you chose a lossy format.
- Check the preview and dimensions, then use the download button to save the result.
Formula & method
Worked examples
A 1200 by 800 landscape photo held sideways, rotated 90 degrees right.
- Original dimensions: 1200 wide by 800 tall.
- A 90 degree turn is a quarter turn, so width and height swap.
- New dimensions: 800 wide by 1200 tall (portrait).
Result: The photo stands upright at 800 by 1200 px.
A 1000 by 1000 square selfie flipped horizontally.
- A horizontal flip applies scale(-1, 1) on the canvas.
- Pixels on the left swap with pixels on the right.
- Dimensions stay 1000 by 1000 because a flip does not rotate the frame.
Result: A mirrored 1000 by 1000 px image, same size as the original.
An 800 by 600 image rotated 180 degrees.
- A 180 degree rotation is a half turn about the centre.
- Width and height do not swap for 180 degrees.
- Top-left content ends up at the bottom-right.
Result: An upside-down 800 by 600 px image, same dimensions as the original.
What each transform does to a sample 1200 by 800 image
| Action | Effect | Output size |
|---|---|---|
| Rotate left (90 left) | Quarter turn counter-clockwise | 800 x 1200 |
| Rotate right (90 right) | Quarter turn clockwise | 800 x 1200 |
| Rotate 180 | Half turn, image upside down | 1200 x 800 |
| Flip horizontal | Mirror across the vertical axis | 1200 x 800 |
| Flip vertical | Mirror across the horizontal axis | 1200 x 800 |
Output format guide
| Format | Transparency | Best for |
|---|---|---|
| PNG | Yes | Logos, screenshots, anything with transparent areas |
| JPEG | No (white fill) | Photographs where small file size matters |
| WebP | Yes | Modern web use, smaller files than PNG or JPEG |
EXIF orientation tag values and how to undo them
| Tag value | What it means | Fix with this tool |
|---|---|---|
| 1 | Normal, no rotation stored | None needed |
| 2 | Mirrored horizontally | Flip horizontal |
| 3 | Rotated 180 degrees | Rotate 180 |
| 4 | Mirrored and rotated 180 degrees | Flip vertical |
| 6 | Rotated 90 degrees clockwise | Rotate left to undo |
| 8 | Rotated 90 degrees counter-clockwise | Rotate right to undo |
Common mistakes to avoid
- Confusing a flip with a rotation. Rotating 180 degrees keeps text readable but upside down. A horizontal flip mirrors the content, so any text reads backwards. Pick the one that matches what you actually want.
- Exporting transparency as JPEG. JPEG cannot store transparency, so transparent areas become a solid white fill. If you need to keep transparency, export as PNG or WebP instead.
- Expecting the file size to stay identical. Re-encoding through the canvas can change the file size, especially for lossy formats. The pixel dimensions are preserved (allowing for the width and height swap on a quarter turn), but bytes may differ.
- Forgetting that quarter turns swap dimensions. After a 90 or 270 degree rotation a landscape image becomes portrait and vice versa. If a layout needs an exact size, check the result dimensions shown under the preview.
- Assuming EXIF orientation fixes itself everywhere. Most modern apps read the EXIF orientation tag and display a photo upright automatically, but plenty of scanners, older viewers, and content systems ignore it. If a photo looks sideways in one place but fine in another, rotate it here to bake the correct orientation into the pixels.
- Flipping a scan that actually needed a 180 degree rotation. An upside-down scanned page needs Rotate 180, not a flip. Flipping it mirrors the text so it reads backwards; rotating 180 keeps the letters facing the right way, just upside down until you rotate.
Glossary
- Rotation
- Turning the entire image around its centre by a fixed angle, such as 90 or 180 degrees.
- Flip (mirror)
- Reflecting the image across an axis so left and right, or top and bottom, are swapped, like looking in a mirror.
- Canvas
- A browser drawing surface used here to apply the transform and produce the new image file entirely on your device.
- Aspect ratio
- The ratio of width to height. A quarter turn swaps the two, turning landscape into portrait or the reverse.
- Lossy format
- An image format such as JPEG or WebP that discards some data to shrink the file, controlled by a quality setting.
- EXIF orientation
- A metadata tag some cameras and phones store in a photo telling viewers how to rotate it for display, separate from the actual pixel data.
- Lossless transform
- An operation such as a 90 or 180 degree rotation or a flip that rearranges pixels without discarding any image data, unlike lossy re-compression.
- Landscape vs portrait
- Landscape means wider than tall, portrait means taller than wide. A 90 or 270 degree rotation swaps one for the other.
Frequently asked questions
How do I rotate an image online for free?
Upload your photo, then press Rotate left or Rotate right for a 90 degree turn, or Rotate 180 for a half turn. The preview updates instantly and you can download the result. It is free and runs entirely in your browser.
What is the difference between rotating and flipping an image?
Rotating turns the whole image around its centre, so a 180 degree rotation leaves text upside down but still readable in a mirror sense. Flipping mirrors the image across an axis, which reverses left and right (or top and bottom) like a true mirror.
Will rotating or flipping reduce my image quality?
A 90 or 180 degree rotation and any flip are lossless operations on the pixels. Quality only changes if you re-export to a lossy format like JPEG or WebP at a low quality setting. Choose PNG or a high quality value to preserve detail.
Is my image uploaded to a server?
No. The tool reads your file with the browser FileReader and processes it on a canvas, all on your own device. The image never leaves your computer, so it stays private and works offline once the page has loaded.
Can I keep transparency when I rotate a PNG?
Yes. Choose PNG or WebP as the output format and transparency is preserved. JPEG cannot store transparency, so transparent areas are filled with white when you export as JPEG.
Why did my landscape photo become portrait after rotating?
A 90 or 270 degree turn is a quarter rotation, which swaps the width and height. A 1200 by 800 landscape image becomes 800 by 1200 in portrait. Rotating 180 degrees keeps the original dimensions.
Can I rotate an image by a custom angle like 15 or 45 degrees?
This tool focuses on 90 and 180 degree turns and horizontal or vertical flips, which cover almost every sideways, upside-down, or mirrored photo in one click. Straightening a tilted horizon by a small custom angle is a different job, usually handled by a crop or straighten tool with an angle slider.
Why does my photo look upright in one app but sideways in another?
Some cameras and phones store an EXIF orientation tag instead of rotating the actual pixels. Apps that read the tag show the photo upright; apps that ignore it, including some scanners and older viewers, show it sideways or upside down. Rotating the photo here fixes the pixel data itself, so it displays correctly everywhere.
Does flipping horizontally then flipping vertically give the same result as rotating 180 degrees?
Visually, yes. Flipping across both axes one after the other produces the same final image as a single 180 degree rotation. The dimensions stay the same either way, since neither a flip nor a 180 degree rotation swaps width and height.
Does rotating or flipping remove metadata like GPS location from my photo?
Yes, in most cases. Re-exporting an image through the canvas strips EXIF metadata, including GPS coordinates and the camera model, from the downloaded file. This is a useful side effect if you want to remove location data before sharing a photo online.