TOOLTIKI Lovable tool, really free
Image Edit

Rotate an image

Edited in your browser · the file is never uploaded

Local · canvas grown to fit the corners
Advertisement
320 × 100

Rotates an image by a quarter turn or by any angle. At an arbitrary angle the canvas is grown to fit the rotated corners, so nothing is clipped.

How to rotate an image

1 Choose an image.
2 Tap 90°, 180° or 270°, or drag for any angle.
3 Save the result.

The detail most rotate tools get wrong is the canvas size. A quarter turn just swaps width and height, but at 45° a square needs a canvas about 1.41 times as wide or the corners are cut off — and because the clipping happens at the edges, it often is not noticed until later. The canvas here is sized from the rotated bounding box, so the whole image survives at any angle.

The cost is that an arbitrary angle resamples. Rotating by 90, 180 or 270 is a pure pixel remapping — every pixel lands exactly on another pixel, and the result is bit-for-bit as sharp as the original. Any other angle has to interpolate, so fine detail softens slightly and hard edges pick up a faint stair-step. Rotating back and forth repeatedly compounds it, so make the correction once from the original rather than nudging it several times.

A related thing worth knowing: a photo that looks rotated on one device and upright on another is usually not rotated at all. Cameras store the orientation as an EXIF tag rather than rotating the pixels, and software that ignores the tag shows it sideways. Drawing to a canvas bakes the current orientation in and drops the tag, which is why saving from here makes the rotation stick everywhere.

Questions

The canvas is sized to the rotated bounding box. At 45° a square needs about 1.41 times the width, or the corners clip.

MDN — CanvasRenderingContext2D.drawImage()MDN — HTMLCanvasElement.toBlob()
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING