Rotate an image 90°, 180° or any angle — straighten tilted photos

This tool turns images clockwise by 90°, 180° or 270°, or by any angle from −180° to 180° to straighten a tilted shot, all on your device.

Live demo · real result from this tool

Drop images here

or paste with Ctrl+V · nothing is uploaded

Rotate clockwise

Your result appears here — processed on your device.

Processed on your device — nothing is uploaded.

How to use Image Rotator

  1. Choose one or more images.
  2. Under Rotate clockwise, pick 90°, 180°, 270° or Other.
  3. With Other, set the Angle slider (−180° to 180°, in 1° steps). Keep Transparent corners ticked, or untick it and choose a Corner fill colour.
  4. Choose Save as and, for lossy formats, the Quality.
  5. Press Rotate and download the files ending in -rotated.

What it does and when to use it

The rotator has two jobs.

Quarter turns fix photos that are on their side or upside down: a document photographed in landscape, a scan fed in the wrong way, or a phone picture that a website shows sideways. These turns are exact and lossless.

Small angles straighten pictures that are slightly tilted: a sloping horizon, a crooked shelf, a page photographed at a slight angle. A turn of 2° or 3° is often all it takes.

It does not mirror anything. If text in a photo reads backwards, you need the Image Flipper instead.

How it works

The image is decoded in your browser, with the camera’s orientation tag applied, so you start from the picture as it looks on screen.

For 90°, 180° and 270°, each pixel moves to a new position by a fixed rule. For a 90° clockwise turn, the pixel at column x, row y moves to column (height − 1 − y), row x. Width and height swap for 90° and 270°. No pixel values change.

For any other angle, the picture is drawn onto a larger canvas with high-quality smoothing. The new canvas size is:

  • width = w × |cos θ| + h × |sin θ|
  • height = w × |sin θ| + h × |cos θ|

where w and h are the original width and height and θ is the angle. Positive angles turn clockwise. The corners that appear are left transparent or filled with your colour.

Worked examples

A sideways phone photo. A 4,032 × 3,024 px picture that should be portrait. Choose 90° and it becomes 3,024 × 4,032 px, standing upright. If it ends up upside down, run it again with 180°.

Straightening a horizon by 3°. A 4,000 × 3,000 px beach photo slopes down to the right. Choose Other and set −3° to turn it anticlockwise. Using the formula above, the canvas grows to 4,152 × 3,205 px. Then trim the corners with the Image Cropper.

A product shot at 15° for a playful layout. On a 4,000 × 3,000 px photo, 15° gives a 4,640 × 3,933 px canvas. Keep Transparent corners and save as PNG, so the tilted photo sits cleanly on any background.

Limits and tips

  • Fill colour and JPEG. JPEG has no transparency, so choose a Corner fill colour if you need a JPEG with a custom angle.
  • Metadata is not copied, including the orientation tag, which is no longer needed once the pixels are upright.
  • Custom angles soften slightly because pixels are blended. Rotate once to the final angle rather than in several small steps.
  • Animated GIFs become a single still frame.
  • Afterwards, if the file is too big for a form, bring it down with Compress Image to 200 KB or another size.

Frequently asked questions

My photo looks upright on my phone but sideways on the website. Why?
Phones often store the picture sideways and add a tag saying which way is up. Some websites ignore the tag. This tool applies the tag when it opens the photo and saves the pixels the right way round, so the result looks the same everywhere.
Which way does 90° turn the picture?
Clockwise. Use 270° to turn it 90° anticlockwise, or 180° to turn it upside down.
Why is the image bigger after a small rotation?
When a rectangle is turned by an angle that is not a multiple of 90°, its corners stick out. The tool enlarges the canvas so nothing is cut off and fills the new corners with transparency or a colour.
How do I get rid of the corners after straightening?
Crop them off with the Image Cropper. Crop a little inside the tilted edges so no fill colour is left.
Does rotating reduce quality?
Turns of 90°, 180° and 270° only move pixels, so the picture itself is unchanged. Other angles need smoothing between pixels, which softens it very slightly. Saving as JPEG, WebP or AVIF also compresses it again at the Quality you set.
Why did my JPEG come out as a PNG?
With a custom angle and Transparent corners ticked, the result has see-through areas. JPEG cannot store those, so when Save as is Same format, the tool saves a PNG and tells you.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close