How to rotate an image online
- Drop your image on the box, press Enter on it to browse, or paste one with Ctrl+V. A sample photo, already turned 90 degrees, is loaded so you can see the effect.
- Click Rotate right 90°, Rotate left 90° or Rotate 180°. Each click adds to the current angle, so two right turns make 180°. Reset returns to 0.
- For any other angle, type it in Angle in degrees, clockwise, drag the slider, or tap +1° and -1°. Negative numbers turn counterclockwise.
- Choose Canvas, Fill empty corners and Save as, then click Download rotated image or Copy image.
How the rotation works
The image is drawn on an HTML canvas rotated by your angle, where a positive angle turns clockwise (MDN, rotate). With Fit the whole image, the new canvas is the bounding box of the turned picture: width = W x |cos a| + H x |sin a| and height = W x |sin a| + H x |cos a|, rounded up. Turns of exactly 90, 180 and 270 degrees just move pixels, so nothing is resampled. Other angles are smoothed and look very slightly softer.
Worked example
The 1,200 x 800 sample at 90 degrees shows Rotated 90 degrees clockwise. 1,200 x 800 px becomes 800 x 1,200 px. and downloads as sample-photo-rotated.jpg. At 45 degrees both sides become (1,200 + 800) x 0.7071 = 1,414.2, rounded up to 1,415 x 1,415 px. At 30 degrees the box is 1,440 x 1,293 px.
Limits and edge cases
- Phone photos store their upright direction in EXIF data. Browsers apply it, so what you see is what you get, and the saved file has the pixels already turned and no EXIF.
- Same as the original saves a JPG as a JPG at the Quality you set (92 by default) and a PNG as a PNG. Pick PNG for a lossless result. JPG cannot be transparent, so empty corners become white.
- Keep the original size cuts off whatever no longer fits, which suits straightening a tilted photo. Fit the whole image never cuts. Results over 16,777,216 pixels are scaled down, and animated GIFs use their first frame.
- To mirror a picture use the image flipper, to trim empty corners use the image cropper, and for PDF pages use the PDF page rotator.
Rotate image FAQ
How do I rotate an image 90 degrees?
Load the image and click Rotate right 90° to turn it clockwise or Rotate left 90° for counterclockwise, then click Download rotated image. Clicking again keeps adding 90°.
Does rotating an image reduce its quality?
Not for PNG at 90, 180 or 270 degrees, which only moves pixels. Saving as JPG or WebP recompresses the picture, and angles like 45 degrees smooth the pixels slightly. Choose PNG when you need no loss.
How do I straighten a tilted photo?
Enter a small angle such as 2 or -2 and watch the preview until the horizon is level, then pick Keep the original size or crop afterwards. Use the plus and minus buttons for one degree steps.
Why was my photo sideways before and what happens now?
The camera saved it with an orientation flag that some apps ignore. This tool bakes the orientation your browser shows into the pixels, so the downloaded file stays upright everywhere.
Can I rotate a PDF page instead?
This tool rotates pictures. For a PDF, use the PDF page rotator, which turns one page, chosen pages or every page and saves a new PDF.
Sources: MDN, CanvasRenderingContext2D.rotate; MDN, image-orientation; MDN, canvas element.