Image Tool

Rotate Image Online — Rotate & Flip Photos Instantly

Rotate an image by 90° or any custom angle and flip it horizontally or vertically, in your browser. 90° turns are lossless; output is a PNG. No uploads.

Instant 100% Client-Side No Login
PROCESSINGLOCAL
LIMITNONE
PRIVACYBROWSER-ONLY

Upload image to rotate

JPG, PNG, or WebP

Max 50MB • .jpg,.jpeg,.png,.webp

Files are processed in your browser — never uploaded

What this tool does, and the one distinction that matters

This tool turns an image by a right angle or any custom angle, and optionally mirrors it, entirely inside your browser. It draws your photo onto an HTML canvas, applies the rotation and flip, and exports a PNG. Nothing is uploaded and no server sees the file. The single most useful thing to understand is that a 90° turn and a 37° turn are not the same kind of operation. Rotating by a multiple of 90°, that is 90, 180, or 270 degrees, just moves each pixel to a new whole-number position: the grid is rearranged but no pixel value changes, so it is genuinely lossless. Rotating by any other angle is different, and the next section explains why.

Why a 90° turn is lossless but a 45° turn is not

When you rotate by 90°, every source pixel lands exactly on a destination pixel. We verified this directly: a 4×2 test image rotated 90° becomes 2×4, and the original top-left pixel arrives at the new top-right position with its colour value, 0, 0, 0, completely unchanged. Nothing is blended. Rotate by 45° instead and the source grid no longer lines up with the destination grid, so the browser has to estimate each output pixel by interpolating between the source pixels that overlap it. In a 20×20 test image split into pure black and pure white, a 45° rotation produced 14 grey pixels that existed in neither half, plus 56 semi-transparent pixels along the diagonal edge. That grey is the interpolation, and it is why an off-axis rotation softens fine detail slightly. It is a small, usually invisible cost on a photo, but on sharp text or a line drawing it is worth knowing about. If your only goal is to fix orientation, stick to the 90° buttons and the result is bit-for-bit exact; reserve the slider for deliberate tilts and artistic angles where a trace of softening does not matter.

Why the corners come out transparent, and why the file is a PNG

Rotate a rectangle by anything other than a multiple of 90° and it no longer fits a rectangular frame, so the canvas has to grow to hold the tilted image and the 4 corner triangles are left empty. A 20×20 square rotated 45° needs a 28×28 canvas, and roughly 1 quarter of that area is corner space with no image in it. Those corners are transparent, not white or black. This is the reason the tool exports a PNG: PNG keeps an 8-bit alpha channel, so the empty corners stay see-through and the rotated photo drops cleanly onto any background. A JPG cannot store transparency at all, so it would fill those triangles with a solid colour, usually black, and ruin the result. For a plain 90° turn there are no empty corners, but PNG is still the safe lossless choice.

The maths behind the new canvas size

The tool computes the expanded canvas with basic trigonometry. For an image of width w and height h rotated by angle θ, the new width is w·|cos θ| + h·|sin θ| and the new height is w·|sin θ| + h·|cos θ|. At θ = 90° the cosine is 0 and the sine is 1, so the formula collapses to simply swapping width and height: a 1600×900 photo becomes 900×1600. At θ = 45° both sine and cosine are about 0.707, so a 1000×1000 image expands to roughly 1414×1414, the diagonal of the original. Once the canvas is sized, the tool moves the drawing origin to the centre with translate, applies rotate, applies any horizontal or vertical flip with a scale of -1, then draws the image offset by half its width and height so it turns around its own middle instead of a corner.

Rotation, flipping, and EXIF orientation are three different things

These get confused, so it helps to separate them. Rotation turns the pixel grid through an angle. Flipping mirrors it, left-to-right or top-to-bottom, which is a reflection, not a turn, and the flip buttons here do exactly that. EXIF orientation is a third thing: a numeric tag from 1 to 8 that a phone camera writes into the file to say "display this sideways" without moving any pixels. Modern browsers read that tag when they decode the image, so by the time the photo reaches the canvas it is already shown the right way up, and this tool then bakes the true orientation into the exported pixels. The practical upshot is that if a site was showing your photo sideways because it ignored the EXIF tag, saving a rotated copy here fixes it everywhere, because the correction is now in the pixels themselves rather than a tag some programs skip.

Common turns and sizes at a glance

For quick reference: a right-side-up fix is usually 90° or 270°, an upside-down scan is 180°, and a mirror selfie is a horizontal flip. A 90° or 270° turn swaps the dimensions, so a 4000×3000 photo becomes 3000×4000, while 180° keeps 4000×3000. The slider covers −180° to 180° in 1° steps, and the custom field accepts the same range for precise nudges like straightening a 2° tilt. Every result is exported as a 24-bit PNG with an 8-bit alpha channel, 256 levels of transparency from 0 to 255, and the whole operation runs on a canvas in your browser, so even a 24-megapixel photo never leaves your device.

The angles and their effects, spelled out

The 8 EXIF orientation values map to these same operations: value 1 is normal, 3 is 180°, 6 is 90° clockwise, 8 is 270° clockwise, and values 2, 4, 5, and 7 add a mirror flip on top. The 4 lossless operations are 90°, 180°, 270°, and a pure flip, because each moves every pixel to an exact new integer coordinate. Any of the other 356 whole-degree settings on the slider interpolates. The canvas-growth numbers follow directly from the w·|cos θ| + h·|sin θ| formula: at 30° a 1000×1000 image grows to about 1366×1366, at 45° to 1414×1414, at 60° back to 1366×1366, and at 90° it returns to an exact 1000×1000 with the axes swapped. A 45° rotation wastes just under 50% of the canvas as transparent corners, 4 triangles totalling half the square, while a 10° straighten wastes only about 30%. PNG carries all of that empty space at essentially no cost, because a run of identical fully transparent pixels compresses down to almost nothing under its DEFLATE stage.

How to Use

1

Upload an image file.

2

Use the 90° buttons for a quick turn, the flip buttons to mirror, or the slider for a custom angle.

3

Check the live preview.

4

Apply and download the PNG.

Features

Rotate left or right by 90°, or any angle from -180° to 180°
Flip horizontally or vertically to mirror the image
90°, 180°, and 270° turns are exactly lossless
Live preview before you export
PNG output keeps the transparent corners a tilt leaves behind
Runs in your browser — the file is not uploaded

Common Questions

About Rotate Image

Rotate photos and images by 90 degrees or any custom angle, and flip them horizontally or vertically to fix orientation. A 90°, 180°, or 270° turn is exactly lossless; a custom angle interpolates and leaves transparent corners, so the output is a PNG that keeps them clear. Ideal for scanned pages, sideways phone shots, and mirror selfies. Fast client-side processing with instant download.

Also known as: rotate photo, turn image, flip image, mirror image, fix photo rotation, rotate 90 degrees, straighten photo, flip horizontal vertical.

Processing Note

Rotate Image runs in your browser, so the input you enter is processed locally on this page and is not uploaded to a ToolMintX account.

Tool Limits

Image tools can optimize and transform files, but source quality still matters. Blurry, over-compressed, or badly lit images may need a better original before editing.

Explore More