How to use Rotate Image
Rotate any image by 90°, 180°, 270°, or a free custom angle — all processed on a canvas in your browser with no server upload. When using a non-rectangular angle, the canvas automatically expands to a bounding box that fits the entire rotated image, preventing any pixel from being clipped. Supports JPG, PNG, and WebP; output is a lossless PNG.
- Upload your image using the file picker or drag-and-drop.
- Select a preset rotation angle (90°, 180°, 270°) for quick common rotations.
- Or enable "Custom angle" and enter any value from −360° to 360° for precise control.
- Preview the result on the live canvas — the canvas auto-expands for oblique angles.
- Click "Download Rotated Image" to save the result.
Your data never leaves your device — 100% private processing.
Preset vs. custom angle rotation
Preset angles of 90°, 180°, and 270° are the most common rotations — used to correct photos taken in portrait/landscape mode and to rotate scanned pages. At exactly 90° or 270° the canvas dimensions simply swap (a 1920×1080 image becomes 1080×1920). At 180° the dimensions stay the same. Custom angles (e.g. 15°, 37°) are useful for correcting horizon tilt in landscape photos. At oblique angles, the canvas must expand to a bounding box so no pixel is cropped — a 1000×500 image rotated by 45° requires a canvas of approximately 1061×1061 px.
| Angle | Canvas change | Use case |
|---|---|---|
| 90° / 270° | Width and height swap | Portrait↔landscape correction |
| 180° | No change | Upside-down scan fix |
| Custom angle | Expands to bounding box | Horizon tilt correction |
Bounding-box maths for oblique rotations
When an image of width W and height H is rotated by angle θ, the resulting bounding box has width = |W·cos θ| + |H·sin θ| and height = |W·sin θ| + |H·cos θ|. The rotated image is drawn centred in this expanded canvas using translate(width/2, height/2) → rotate(θ) → drawImage(img, −W/2, −H/2). The background of the expanded area is transparent, making PNG the natural export format. For JPEG output, transparent pixels would become black — PNG is therefore the recommended format for rotated images with custom angles.
Worked examples
Rotate 90°
Inputs: 4000×3000 px, rotate 90°
Result: 3000×4000 px (dimensions swap)
Rotate 180°
Inputs: 4000×3000 px, rotate 180°
Result: 4000×3000 px (unchanged)
Glossary
- Bounding box
- The smallest axis-aligned rectangle that fully contains a rotated shape — its dimensions grow beyond the original when the angle is oblique.
- Clockwise rotation
- A rotation where pixels move in the direction of clock hands — positive angles in the Canvas API rotate clockwise.
- Canvas translate
- A Canvas 2D API operation that moves the coordinate origin, used to centre a rotated image on the expanded canvas.
- Oblique angle
- Any rotation angle that is not a multiple of 90°, resulting in the image not being axis-aligned.
Related reading
Frequently Asked Questions
Why use Rotate Image?
- Correct horizon tilt with a free-angle input from −360° to 360° for precise adjustments
- Canvas auto-expands to a bounding box so no pixel is clipped at oblique rotation angles
- Preset 90° and 270° buttons fix portrait/landscape orientation in a single click
- Lossless PNG output prevents JPEG re-compression artefacts on repeated rotations
Common use cases
- Rotate a scanned document 90° to correct its orientation before running OCR on it
- Straighten a tilted horizon in a landscape photo by applying a precise 3° correction
- Fix a 180° upside-down photo taken by accident without opening any desktop software
- Rotate a floor plan diagram 270° to reorient it for landscape-format presentation slides
- Tilt a product image by 15° for a dynamic angle in a marketing banner layout
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Related Image Tools
Circle Crop Image
Crop any image into a circle with a transparent background. Perfect for round profile pictures and avatars. Free, private PNG export.
Add Border to Image
Add a colored or solid border and frame to your photos. Choose width, color, and corner radius, then download. Free and private.
Flip Image
Flip an image horizontally or vertically and download the result. Fast, private, in-browser mirroring with no quality loss. Free.
Crop Image
Crop images online by entering coordinates or choosing an aspect ratio preset. Free, private, browser-based image cropper. Supports JPG, PNG, and WebP.
Resize Image
Resize any image online by pixels or percentage. Free, private, and instant — no upload needed, and the original aspect ratio is preserved.
Compress Image
Compress JPG, PNG, WebP images online. Reduce file size by up to 90% without visible quality loss. Free, private, runs in your browser.
Explore all Image Tools.