Rotate Image
Rotate images online by 90° clockwise, 90° counter-clockwise, or 180° degrees. Fix sideways photos with zero clipping, automatic dimension swapping, and private export.
Orthogonal Matrix Transformation & Dimension Swapping
Orthogonal rotations (90°, 180°, 270°) are computed via 2D transformation matrices. For a 90° or 270° rotation, canvas width and height swap: W_canvas = H_orig and H_canvas = W_orig. The context translation matrix moves the origin to (W_canvas / 2, H_canvas / 2), followed by ctx.rotate(theta * PI / 180). Drawing the source centered at (-W_orig / 2, -H_orig / 2) maps every pixel to its exact transformed coordinate with zero boundary clipping.
- Zero clipping guarantee: Dimension swapping ensures complete rectangular visibility across all rotation angles.
- Physical pixel restructuring: Permanently solves EXIF orientation bugs across legacy software and email clients.
- Alpha channel safety: Transparent backgrounds in PNG and WebP files remain completely intact.
- Single-pass encoding: Consecutive rotations update state without re-compressing until download is clicked.
- Private and safe: Runs entirely in browser memory; no uploads to external servers.
All pixel processing, color space conversions, and image compression execute entirely inside your local web browser. No files, pixels, or document metadata are ever uploaded to any external server or saved in cloud storage.
Why do some photos appear upright on my phone but sideways on my PC?
Smartphones often store camera orientation as an EXIF metadata tag (e.g. Orientation: 6) without physically rotating the underlying pixel matrix. Some desktop photo viewers, websites, and email clients do not read this tag, causing the photo to display sideways. This tool physically transforms the pixel grid so it displays correctly everywhere.
Does rotating an image cut off or clip the corners?
No. When rotating by 90° or 270°, the canvas dimensions automatically swap (Width becomes Height, and Height becomes Width). The rotation origin is translated to the center of the canvas, ensuring 100% of the image is preserved without any clipping.
Does rotating degrade image quality?
90° and 180° rotations are orthogonal transformations that do not require non-integer subpixel interpolation. While saving as lossy JPEG performs standard quantization, saving as PNG guarantees 100% lossless pixel retention.
Can I reset the rotation if I make a mistake?
Yes. Clicking the 'Reset' button immediately returns the rotation angle back to 0°.
What is the maximum file size supported?
You can rotate files up to 10 MB and 8,192 pixels per side.