🔄 Image Rotate and Flip Tool
By ToolNimba Editorial Team · Updated 2026-06-19
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.
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.
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.
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.
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.
- Pick an output format (PNG, JPEG, or WebP) and adjust quality if you chose a lossy format.
- Check the preview, 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 |
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.
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.
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.