Rotate, Flip & Mirror Image

Rotate an image by 90°, 180° or any angle, flip it, straighten a tilted horizon, or mirror one half onto the other. Choose whether the corners expand the canvas or are cropped away.

Tool Media & Files Updated Oct 4, 2026
How to Use
  1. Pick a mode: Rotate, Straighten or Mirror. A tilted sample photo is levelled as soon as the page opens.
  2. Drop an image on the box, click to browse, or paste one. TIFF, PSD, HEIC, TGA, PCX and camera RAW files open too.
  3. Rotate: use the 90° and 180° buttons or type any angle (positive turns clockwise), tick the flips, and choose what happens to the corners: expand the canvas, crop to the largest clean rectangle, or keep the original size.
  4. Straighten: click two points on a line that should be level (a horizon, a shelf, a door frame), or upright, and the correction angle is measured for you.
  5. Mirror: choose which half is copied onto the other, or 4-way symmetry, and move the axis to change where the reflection starts.
  6. Save the result in any format from the Save panel. Show Work gives the angle, canvas size and crop for your own image.
Image & Transform
degrees, + = clockwise
Presets
Result
Angle
—
Output
—
Area Kept
—
Blank Area
—

Worked Example

Levelling an 800×600 photo tilted 3.5° clockwise. Rotate by −3.5°: cos 3.5° = 0.998135 and sin 3.5° = 0.061049. To hold the whole picture the canvas must be 800 × 0.998135 + 600 × 0.061049 = 835.1 → 835 px wide and 800 × 0.061049 + 600 × 0.998135 = 647.7 → 648 px tall, and 11.3% of that canvas is blank corners.

Cropping the corners away instead. s = min(800 ÷ 835.14, 600 ÷ 647.72) = min(0.9579, 0.9263) = 0.9263, so the largest clean 4:3 rectangle is 800 × 0.9263 by 600 × 0.9263, rounded down to 741×555: 85.7% of the original area.

Measuring the tilt. In Straighten mode, clicking the horizon at (100, 311.65) and (700, 348.35) gives a drop of 36.7 px over 600 px: atan(36.7 ÷ 600) = 3.50°, so the correction is −3.50°.

The common mistake: turning the wrong way. A horizon that falls to the right is tilted clockwise and needs a negative (anticlockwise) turn. Entering +3.5° doubles the tilt to 7° instead of removing it. Straighten mode works out the sign for you.

Show Work

Load an image to see the rotation worked out step by step.

Formulas

Expanded canvas
W′ = W|cos θ| + H|sin θ|
H′ = W|sin θ| + H|cos θ|
The box that holds the whole rotated image
Crop to fill
s = min(W ÷ W′, H ÷ H′)
Largest same-shape rectangle inside the rotated image: sW × sH
Rotation
x′ = x cos θ − y sin θ
y′ = x sin θ + y cos θ
About the centre, with y pointing down, so + is clockwise
Straighten
θ = −atan2(y₂ − y₁, x₂ − x₁)
For an upright line, measured from vertical instead
Flip and mirror
x′ = W − 1 − x   or   x′ = 2a − 1 − x
Whole-image flip, or reflection about an axis at column a

Turns, Flips and the Eight Orientations

Combining quarter turns with a flip gives exactly eight different results: the four rotations, and each of them mirrored. Mathematicians call this the dihedral group of order 8, the symmetries of a square. Image files use the same eight: the Orientation tag (number 274) defined in TIFF 6.0 in 1992, and later adopted by Exif for camera JPEGs, has values 1 to 8, which is how a phone can store a photo sideways and have viewers turn it upright.

Because quarter turns and flips only move pixels, they can be done without loss. The Independent JPEG Group’s jpegtran even rotates a JPEG by rearranging its 8×8 compressed blocks without decoding it. Any other angle needs interpolation. Mirror symmetry has a longer story: David Brewster invented the kaleidoscope in 1816, and its two angled mirrors produce the same repeated reflections as the 4-way mode here.

About This Tool

This tool rotates by quarter turns (pixel-exact) or any angle, flips, measures and corrects a tilt from two clicked points, and builds mirror compositions with a movable axis. For free angles you choose between a larger canvas, the largest clean crop, or the original size, and what colour fills any blank corners.

Images are decoded and saved in your browser by the engine behind the Universal Image Converter, so TIFF, PSD, HEIC, TGA, PCX and RAW files work too. Nothing is uploaded.

Related tools: Image Cropper, Kaleidoscope Mirror, and Image Resizer.

Frequently Asked Questions

Does rotating an image lose quality?

Not at 90°, 180° or 270°, or for flips: every pixel moves to an exact new position, so nothing is resampled. Any other angle puts the pixel grid between source pixels, so new values are interpolated and the image softens slightly. Rotate once from the original rather than in several small steps.

Why does the image get bigger when I rotate it?

A tilted rectangle needs a larger box around it: width = W·|cos θ| + H·|sin θ| and height = W·|sin θ| + H·|cos θ|. An 800×600 photo turned 3.5° needs 835×648, and at 45° it needs 990×990. The extra corners are transparent, or filled with the colour you choose.

What does Crop to fill do?

It keeps the largest rectangle with the original proportions that lies entirely inside the rotated picture, so there are no blank corners: scale s = min(W ÷ (W·cos θ + H·sin θ), H ÷ (W·sin θ + H·cos θ)). For 800×600 at 3.5° that is s = 0.926, a 741×555 result that keeps 85.7% of the area.

How do I straighten a crooked horizon?

Switch to Straighten and click two points along the horizon. A line from (100, 311.65) to (700, 348.35) drops 36.7 px over 600 px, an angle of atan(36.7 ÷ 600) = 3.50°, so the image is turned −3.50° and cropped. Choose Upright instead for walls, poles and door frames.

What do the mirror styles do?

They keep one part of the image and add its reflection. Left onto right with the axis at 50% keeps the left 400 columns of an 800-pixel-wide picture and mirrors them, so the result is still 800 wide; with the axis at 40% it keeps 320 columns and comes out 640 wide. 4-way mirrors the top-left corner into all four quarters, a kaleidoscope-style pattern.

How do I use the Rotate, Flip & Mirror Image?

Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Does it cost anything or need an account?

No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.

Is anything I type uploaded?

No. The tool works entirely on your device, so the values you enter never leave your browser.

Common Use Cases

Sideways phone photos

Turn a 3024×4032 portrait that opened on its side by 90° to 4032×3024 with no quality loss.

Upside-down scans

Rotate a scanned page 180° in one click; at an exact half turn the text stays pin-sharp.

Level a horizon

A 2° tilt in a 4000×3000 landscape is fixed with Straighten and Crop to fill, keeping 91% of the picture.

Un-mirror a selfie

Flip a front-camera photo horizontally so the writing on a shirt or sign reads the right way round.

Symmetric art and backgrounds

Mirror the left half of a face, a building or a texture onto the right, or use 4-way symmetry for a seamless kaleidoscope tile.

Layout direction

Flip a product or portrait shot so the subject faces into the page instead of out of it.

Last updated: