Back to All Tools

Image Rotator

Rotate images to any angle or flip horizontally/vertically. Fix orientation issues instantly. Works with JPG, PNG & other formats. Quick & easy.

Upload an image to rotate, flip, and transform.


About Image Rotator

Free Online Tool

Image Rotator

Rotate any image to 90°, flip horizontally or vertically, or dial in a precise custom angle — all adjustments previewed live before download.

How to Use This Tool (30 Seconds)

  1. 1Upload Your Image: Click the upload zone and select your file. JPG, PNG, WebP, GIF, and BMP are all supported. The image renders instantly in the preview canvas.
  2. 2Rotate or Flip: Click the 90° button for a standard clockwise rotation, or use the Flip Horizontal and Flip Vertical toggles to mirror the image along either axis.
  3. 3Set a Custom Angle: Drag the angle slider anywhere from −180° to +180° for freeform rotation. The canvas updates in real time as you drag — no need to confirm each adjustment.
  4. 4Download the Result: Hit 'Download.' The final image is exported at the original resolution with all rotation and flip transforms baked into the pixel data.

How Rotation and Flip Transform Pixel Data

All transforms are applied using the browser's Canvas 2D API affine transformation matrix. Each operation modifies how pixel coordinates map to the output canvas:

// 90° clockwise — translate origin, rotate

ctx.translate(canvas.width / 2, canvas.height / 2)

ctx.rotate((Math.PI / 180) * 90)

// Horizontal flip — scale x-axis by −1

ctx.scale(−1, 1); ctx.translate(−width, 0)

// Vertical flip — scale y-axis by −1

ctx.scale(1, −1); ctx.translate(0, −height)

// Custom angle — arbitrary radian rotation

ctx.rotate((Math.PI / 180) * angleDegrees)

For custom angles that are not multiples of 90°, the output canvas expands to a bounding box large enough to contain the rotated image without cropping. The bounding box dimensions are calculated as: newWidth = |w·cosθ| + |h·sinθ| and newHeight = |w·sinθ| + |h·cosθ| — ensuring no pixel is clipped at any angle.

Transform Reference — Effect & Output Dimensions

TransformVisual EffectOutput DimensionsCommon Use
90° ClockwiseLandscape becomes portraitWidth ↔ Height swappedFix sideways phone photos
Flip HorizontalLeft-right mirrorUnchangedCorrect selfie reversal, text in mirror
Flip VerticalTop-bottom mirrorUnchangedCorrect upside-down scans, artistic effect
Custom AngleFreeform rotationBounding box expandsStraighten horizon, fix tilted scans

⚡ Pro Tip

When straightening a tilted photo with the custom angle slider, use the horizon or a known vertical edge as your reference — not the subject. Rotate until a flat surface in the background appears level rather than trying to center the subject. For scanned documents, align the text baseline to the canvas edge at ±0.5° increments — corrections below 1° are invisible in casual viewing but significantly improve OCR accuracy if the image will be processed by text recognition software afterward.

Frequently Asked Questions

Q: Does rotating an image reduce its quality?

90°, 180°, and 270° rotations on PNG and lossless formats produce zero quality loss — the pixel grid maps perfectly to the new orientation. JPG images re-encoded after rotation incur minor compression loss. For JPG, lossless rotation tools that rearrange DCT blocks without re-encoding are preferable for repeated rotations.

Q: Why does the canvas get bigger when I use a custom angle?

Any rotation angle that is not a multiple of 90° produces a rotated rectangle that extends beyond the original frame boundaries. The canvas expands to the minimum bounding box that contains the full rotated image — preventing any pixel from being cropped. Corner areas outside the original image fill with a transparent or white background.

Q: What is the difference between flip horizontal and flip vertical?

Flip horizontal mirrors the image left-to-right along the vertical center axis — like holding it up to a mirror. Flip vertical mirrors it top-to-bottom along the horizontal center axis — like turning it upside down and reversing. Both operations leave width and height dimensions unchanged.

Q: Can I rotate a PNG with a transparent background without losing transparency?

Yes. The Canvas API preserves the alpha channel through all rotation and flip operations. Download as PNG to retain transparency. Downloading as JPG will flatten transparency to white since the JPG format does not support an alpha channel.

Q: Why does my rotated JPG look slightly different from the original?

JPG is a lossy format. Any operation that requires re-encoding — including rotation — recompresses the image and introduces slight quality changes. To minimize this, rotate once and download once rather than rotating and re-downloading multiple times, as each cycle compounds compression loss.

Q: Does the tool preserve EXIF orientation metadata after rotation?

The rotation is baked into the pixel data and the EXIF orientation tag is reset to default (1 — normal). This prevents double-rotation when the image is opened in software that reads EXIF orientation flags, which was the original cause of sideways photos appearing correctly on some devices but rotated on others.

Q: What is the maximum image size this tool supports?

Images up to 20MB are supported. Very large images — above 4000×4000 pixels — may render slowly in the preview canvas depending on device GPU capability. The download output always matches the full original resolution regardless of how the preview is displayed.