---
title: "Rotate Image Online – 90°, 180° or Custom Angle | CompressFly"
description: "Rotate JPG, PNG, WebP, AVIF, and BMP images by 90°, 180°, or any custom angle (-180° to 180°) in your browser. Expand canvas or keep size and export for free."
canonical_url: "https://compressfly.com/edit-image/rotate-image"
meta:
  "og:description": "Rotate JPG, PNG, WebP, AVIF, and BMP images by 90°, 180°, or any custom angle (-180° to 180°) in your browser. Expand canvas or keep size and export for free."
  "og:image": "https://compressfly.com/img/en/social/edit-image/rotate-image.png"
  "og:image:alt": "Rotate Image Online – 90°, 180° or Custom Angle | CompressFly"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Rotate Image Online – 90°, 180° or Custom Angle | CompressFly"
  "twitter:description": "Rotate JPG, PNG, WebP, AVIF, and BMP images by 90°, 180°, or any custom angle (-180° to 180°) in your browser. Expand canvas or keep size and export for free."
  "twitter:image": "https://compressfly.com/img/en/social/edit-image/rotate-image.png"
  "twitter:image:alt": "Rotate Image Online – 90°, 180° or Custom Angle | CompressFly"
  "twitter:title": "Rotate Image Online – 90°, 180° or Custom Angle | CompressFly"
---

> Index of every page on this site: [llms.txt](https://compressfly.com/llms.txt)

# Rotate Image Online

Rotate static **JPG/JPEG, PNG, WebP, AVIF, and BMP** images left (`-90°`), right (`+90°`), `180°`, or by a custom angle from **`-180°` to `180°`** directly in your browser. Choose **Expand to Fit** to fit the whole rotated image or **Keep Original Size**, check the preview and calculated dimensions, and export a new **PNG, JPG, or WebP** for free with zero image uploads.

## How to Rotate an Image Online in 3 Easy Steps

Fix sideways photos or straighten crooked scans and horizons—100% locally in your browser:

1. **Select Your Image** — Choose a .jpg, .jpeg, .png, .webp, .avif, or .bmp image from your device, or drag and drop it directly into the workspace.
2. **Set the Rotation Angle & Canvas Mode** — Click Left 90°, Right 90°, or 180°, or drag the slider / type a custom degree from -180° to 180°. Choose Expand to Fit (enlarges canvas to show all corners) or Keep Original Size (retains original canvas bounds).
3. **Choose Output Format and Download** — Review the preview and calculated output dimensions, select PNG, JPG, or WebP, and click Download Image. PNG and WebP retain existing transparency and new empty corner areas; JPG fills all transparent areas with white.

## How Does the CompressFly Image Rotator Work?

The CompressFly image rotator turns a static **JPG/JPEG, PNG, WebP, AVIF, or BMP** image around its center. Add a **Left 90°**, **Right 90°**, or **180°** turn, or set a manual angle from **-180° to 180°** while checking the preview. This is manual rotation, without automatic skew detection or perspective correction.

**Expand to Fit** calculates a whole-pixel bounding box for the rotated image. **Keep Original Size** retains the source canvas dimensions and crops overflow. PNG and WebP retain existing transparency and new empty corner areas; they do not remove an opaque background. JPG fills all transparent areas with white. Export creates a newly encoded static image, so pixel detail can change and original EXIF or other metadata is not guaranteed to be retained. Processing runs locally in your browser, with no image uploads.

### What "in your browser" means

- Image files are not uploaded to a server
- Rotation and export run locally on your device
- Rotated files download directly from your browser

## Expand to Fit vs. Keep Original Size: How Output Dimensions Change

Your chosen angle and canvas mode determine the final pixel width and height—and whether angled corners are preserved or cropped:

| Rotation & Canvas Mode | Output Pixel Dimensions (e.g., 1920 × 1080 px Source) | Corner / Edge Behavior | Best Use Case |
| --- | --- | --- | --- |
| **`90°` Left/Right + Expand to Fit** | Width & Height swap → **`1080 × 1920 px`** | Fits the whole quarter-turned image without adding triangular corner gaps. | Fixing sideways portrait/landscape camera photos and phone scans. |
| **`180°` Turn (Either Mode)** | Unchanged → **`1920 × 1080 px`** | Turns an upside-down image through a half-turn without creating a mirror reflection. | Correcting upside-down camera mounts, flatbeds, and overhead scans. |
| **Custom Angle (`-180°` to `180°`) + Expand to Fit** | Whole-pixel bounding box (e.g., `+5°` → **`2007 × 1244 px`**) | Fits all four geometric corners. New empty areas remain **transparent in PNG/WebP** or are filled **white in JPG**. | Angling stickers, graphics, or scans while keeping their full rotated bounds in the output canvas. |
| **Custom Angle + Keep Original Size** | Locked to source → **`1920 × 1080 px`** | Trims outer corners that extend past the original canvas frame. | Maintaining fixed grid or banner dimensions (or crop cleanly afterward in [Crop Image](https://compressfly.com/edit-image/crop-image)). |
| **Mirror Reflection or PDF Pages** | Same dimensions (`Flip`) or PDF page tree | Mirrors left↔right / top↕bottom, or rotates `.pdf` document pages. | Use [Flip Image](https://compressfly.com/edit-image/flip-image) for mirror reflections or [Rotate PDF](https://compressfly.com/pdf-tools/rotate-pdf) for PDFs. |

Fitting the rotated bounds does not guarantee unchanged pixels or metadata. Output is re-encoded as a static image. PNG/WebP do not remove opaque backgrounds, and JPG fills every transparent area with white.

## When to Use 90° Turns vs. Custom-Angle Straightening

Choose a quick turn or adjust an angle manually, then inspect the exported result for your intended use:

### Fix Sideways & Upside-Down Photos (±90° / 180°)

Adjust the image orientation you see in the preview using Left 90°, Right 90°, or 180°, then check the exported result in the app where you plan to use it. The tool does not diagnose or automatically repair EXIF orientation tags.

### Deskew Tilted Document & Receipt Scans

Set a small manual angle, such as -2° or +3.5°, and use the preview to judge the text alignment before cropping. The tool does not detect a skew angle automatically or correct perspective.

### Straighten Crooked Horizons & Architecture

Manually adjust the angle to level a horizon or one building edge, then trim outer gaps with Crop Image if needed. Rotation does not correct converging lines or perspective distortion.

### Angle Transparent Stickers, Icons & Cutouts

Use Expand to Fit and export PNG or WebP to retain existing transparent areas and new empty corners around a rotated cutout. Any opaque background already in the source remains opaque.

## Precision Controls in the Image Rotator Workspace

Control exact degree increments, canvas bounding boxes, and corner transparency in one place:

### One-Click 90° / 180° & -180° to 180° Custom Angles

Left 90°, Right 90°, and 180° add a turn to the current angle. Use the slider or numeric input to choose a manual angle from -180° to 180°, including decimal values such as +3.5°.

### Expand to Fit vs. Keep Original Size

Fit the rotated image inside its calculated bounding box, or retain the original canvas width and height and crop overflow. These options control the canvas bounds; they do not make export a lossless pixel transformation.

### Source Transparency & Empty Corner Fill

PNG and WebP retain source transparency and new empty corner areas without removing an opaque background. JPG fills the entire canvas white before drawing, so both original transparent areas and new gaps become white.

### Live Dimension Readout & 100% Local Privacy

See the calculated output Width × Height update as the angle changes. The on-screen preview may be scaled for display; the readout describes the output file dimensions. Rotation and export run locally on your device.

## Related Image Orientation, Cropping & Editing Tools

- [Flip & Mirror Image (500+ Batch Horizontal/Vertical)](https://compressfly.com/edit-image/flip-image)
- [Crop Image (Trim Rotated Corners & Aspect Ratios)](https://compressfly.com/edit-image/crop-image)
- [Resize Image (By Exact Pixels or Percentage)](https://compressfly.com/edit-image/resize-image)
- [Add Border to Image (Outside & Inside Photo Frames)](https://compressfly.com/edit-image/add-border-to-image)
- [Grayscale & Black-and-White Image](https://compressfly.com/edit-image/grayscale-image)
- [Remove Image Background (Transparent Cutouts)](https://compressfly.com/edit-image/remove-background)
- [Passport Photo Maker (2×2", 35×45mm & 300 DPI)](https://compressfly.com/edit-image/passport-photo-maker)
- [Change Image DPI (300 / 600 DPI)](https://compressfly.com/edit-image/change-image-dpi)
- [Split Image (Grid & Tile Slicer)](https://compressfly.com/edit-image/split-image)
- [Social Media Image Resizer (25 Presets)](https://compressfly.com/edit-image/social-media-image-resizer)
- [Rotate PDF Pages](https://compressfly.com/pdf-tools/rotate-pdf)
- [Reverse Animated GIF](https://compressfly.com/gif-tools/reverse-gif)

## Free Image Rotator FAQ

### How do I rotate an image online?

Select one JPG/JPEG, PNG, WebP, AVIF, or BMP image. Add a Left 90°, Right 90°, or 180° turn, or set a manual angle from -180° to 180°. Choose Expand to Fit or Keep Original Size, review the preview and output dimensions, then download a new static PNG, JPG, or WebP. Check the exported result in your intended app.

### How do I rotate a sideways photo by 90 degrees or flip an upside-down photo 180 degrees?

Left 90° adds a counterclockwise quarter-turn, Right 90° adds a clockwise quarter-turn, and 180° adds a half-turn to the current angle. With a total angle of 90° and Expand to Fit, a 1920 × 1080 px source uses a 1080 × 1920 px output canvas. A total angle of 180° keeps the dimensions at 1920 × 1080 px.

### Can I straighten a tilted photo or document scan by a small custom angle?

Yes. Set a manual angle from -180° to 180°, such as -2° or +3.5°, and judge the alignment in the preview. There is no automatic skew detection or perspective correction, so check the exported result. [Crop Image](https://compressfly.com/edit-image/crop-image) can trim the angled outer gaps afterward.

### What is the difference between "Expand to Fit" and "Keep Original Size"?

Expand to Fit calculates a whole-pixel bounding box that contains the rotated image. Keep Original Size retains the source canvas width and height and crops overflow. For a 1920 × 1080 px source at +5°, Expand to Fit produces 2007 × 1244 px; Keep Original Size stays at 1920 × 1080 px. Fitting the canvas does not guarantee unchanged pixel detail or metadata.

### How can I keep the corners around a custom-rotated image transparent?

Choose PNG or WebP to retain existing transparency and the empty corner areas created by rotation. This does not remove an opaque background already in the image. JPG fills all transparent areas with white, including both the original transparent regions and any new corner gaps.

### What is the difference between rotating an image and flipping an image?

Rotation turns the image around its center without creating a mirror reflection; text and other content turn with the image. Flipping reflects the image horizontally or vertically. Use [Flip Image](https://compressfly.com/edit-image/flip-image) for mirror reflections or batch flipping.

### Which input and output image formats are supported?

The tool accepts six file extensions across five formats: JPG/JPEG, PNG, WebP, AVIF, and BMP. It exports a newly encoded static PNG, JPG, or WebP, without preserving animation or a complete set of original EXIF and other metadata. For PDF pages, use [Rotate PDF](https://compressfly.com/pdf-tools/rotate-pdf).

### Are my images uploaded to a server, and is this image rotator free?

No files are ever uploaded—all rotation calculations, canvas resizing, and format encoding happen 100% locally inside your web browser on your own computer or phone. CompressFly's image rotator is completely free with no watermarks, no daily limits, and no account registration required.

## Sitemap

See the full [sitemap](https://compressfly.com/sitemap.md) for all pages.
