Icon Rotator

Uploads a PNG icon, decodes it onto an off-screen canvas, and rotates it clockwise by a preset or custom angle, expanding the canvas so no corners get clipped and filling newly exposed areas with transparency, then lets you download the rotated icon. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool rotates a PNG icon by any angle, entirely in your browser, using the HTML canvas API to decode, transform, and re-encode the image.

Because it expands the canvas to fit the full rotated shape, you never lose corners the way a fixed-size rotation would.

What Is Icon Rotator?

A client-side icon rotator that reads an uploaded icon's pixel data, applies an inverse-rotation sampling pass to build a new, correctly-sized output buffer, and paints it to a canvas you can download as a PNG.

It supports the common 90/180/270 degree presets as well as any custom angle from 0 to 360 degrees (or beyond, since angles wrap).

How Icon Rotator Works

For every pixel in the new, larger output canvas, the tool works backward: it rotates that pixel's position by the negative of the requested angle to find where it would have come from in the source icon, then copies that source pixel's color (or leaves it transparent if the calculated source position falls outside the original icon).

This inverse-sampling approach avoids gaps that a naive forward rotation would leave in the output.

When To Use Icon Rotator

Use it to reorient an icon that was exported facing the wrong direction, or to rotate a directional icon (like an arrow) to a specific angle.

It's also handy for quickly previewing how an icon looks at different rotation angles before settling on one for a UI or app manifest.

Often used alongside Icon Cropper and Icon Resizer.

Features

Advantages

  • Runs entirely client-side; the uploaded icon is never sent to a server.
  • Never clips corners, since the canvas expands to fit the rotated bounding box.
  • Supports exact preset angles as well as any custom degree value.

Limitations

  • Nearest-neighbor sampling means non-90-degree rotations can show slightly jagged edges rather than smooth anti-aliased ones.
  • Rotating by an angle that isn't a multiple of 90 degrees changes the icon's canvas dimensions, which may not fit a fixed-size icon slot without further resizing.

Examples

Rotate a directional icon 90°

Input

A 64x64 arrow icon PNG, 90° clockwise

Output

A 64x64 icon PNG with the arrow now pointing the next direction clockwise

Rotating by an exact multiple of 90 degrees keeps the icon square and produces a clean, pixel-perfect result.

Rotate an icon by 45°

Input

A 128x128 icon PNG, 45° clockwise

Output

A roughly 181x181 PNG with the icon rotated diagonally, transparent corners

The output canvas grows to fit the rotated square's diagonal bounding box, so the result is no longer 128x128.

Best Practices & Notes

Best Practices

  • Use the 90/180/270 presets when you need pixel-perfect results with no interpolation artifacts.
  • If you need the rotated icon back at its original square dimensions, follow up with the Icon Resizer or Icon Cropper tool.

Developer Notes

The pure rotation math is reused as-is from the base PNG Rotator's rotatePng function (a plain function over a Uint8ClampedArray pixel buffer, no DOM, using inverse rotation sampling); this tool is a thin, subject-relabeled wrapper (rotateIcon) around that same lib function, since rotating an icon is identical pixel math to rotating any other PNG.

Icon Rotator Use Cases

  • Reorienting a directional icon like an arrow or pointer
  • Rotating a sprite or game icon to a new orientation
  • Correcting an icon exported at the wrong rotation

Common Mistakes

  • Expecting the output icon to keep the same square dimensions as the input — rotated (non-multiple-of-180) icons are generally wider or taller than the source.
  • Forgetting to crop or resize back to a fixed icon size after a non-90-degree rotation expands the canvas.

Tips

  • Combine 90-degree rotations with the Icon Cropper to reach any of the 8 standard orientations while keeping a fixed size.
  • If edges look jagged at a custom angle, try starting from a higher-resolution source icon for a cleaner result.

References

Frequently Asked Questions