Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. All processing happens entirely in your browser - your files never leave your device. No uploads, no accounts, complete privacy.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Image Processing
  3. Image Rotation & Flip
Add to favorites

Image Rotation & Flip

Rotate images to any angle and flip horizontally or vertically. Features precise degree control, 90° quick rotations, and straightening tools.

Rotate images by 90, 180, or 270 degrees, or flip them horizontally and vertically. Quick, straightforward, and runs in your browser.

Edits stay in your browserMore image processingJump to full guide

Initializing in your browser…

You might also like

Image to Base64

Convert images to Base64 encoded strings for embedding in CSS, HTML, or JavaScript. Multiple output formats available.

Image Diff Comparator

Compare two images pixel-by-pixel. Multiple comparison modes: side-by-side, overlay, difference highlighting, onion skin, and slider. Perfect for visual regression testing.

Image Cropper

Crop and trim images with precision visual selection. Features aspect ratio presets (1:1, 16:9, 4:3), free-form cropping, grid overlays, and pixel-perfect adjustments for professional results.

Image Rotation & Flip: a worked example

A scanned document came in sideways and slightly skewed and needs to be upright and straight.

Input

scan.jpg · rotate 90° CW + fine −2.3° deskew
Image Rotation & Flip produces

Output

An upright, straightened scan with auto-cropped edges

Coarse 90° rotation fixes orientation and a fine angle corrects scanner skew; auto-crop removes the empty triangles a rotation introduces. Lossless rotation for JPEGs avoids re-compression where possible.

What is Image Rotation & Flip?

Rotate images by 90, 180, or 270 degrees, or flip them horizontally and vertically. Quick, straightforward, and runs in your browser.

How to use

  1. 1Upload an image
  2. 2Click rotate or flip buttons
  3. 3Download the result

Key features

  • Rotate 90° clockwise or counterclockwise
  • Rotate 180°
  • Horizontal and vertical flip

Tips & best practices

  • At 90, 180, or 270 the canvas matches the source pixels exactly, but any other angle (including the 45 preset or straighten values) adds transparent corner regions because the output is sized to the rotated bounding box.
  • Every export is re-encoded to PNG at quality 1.0, so rotating a JPEG produces a larger PNG file rather than a same-format save.
  • The tool has no EXIF orientation reading, so it transforms the image as the browser shows it; if a photo already looks correct on screen, no rotation is needed even if its embedded orientation flag differs.

Examples

  • Quarter-turn a sideways photo (dimensions swap)

    Click 90 CW under Quick Rotation. The output canvas is recomputed to the swapped dimensions (a 4000x3000 image becomes 3000x4000) and downloads as name-rot90.png.

  • Straighten a tilted horizon

    Use the Straighten slider (range -15 to +15, 0.5 steps) or a preset like -2. Because rotation grows the canvas to a bounding box, the corrected image keeps all content but gains transparent corner wedges in the PNG.

  • Mirror for a selfie

    Toggle Flip Horizontal, which applies ctx.scale(-1,1). Dimensions stay identical and the file saves as name-flipH.png.

How it works

All transformations run through the HTML Canvas 2D API in your browser. Rotation is applied with ctx.rotate(degrees * Pi / 180) after recomputing the output canvas to a bounding box of width*|cos| + height*|sin| by width*|sin| + height*|cos|, so the canvas always grows to contain the rotated image rather than cropping it. A 90 or 270 degree rotation therefore swaps the width and height, while an off-axis angle such as the built-in 45 degree preset produces a larger canvas with transparent triangular corners (preserved because the result is written as PNG). Flipping is done separately with ctx.scale(-1, 1) for horizontal mirroring or ctx.scale(1, -1) for vertical, and unlike rotation a flip keeps the original pixel dimensions unchanged.

The interface composes transforms in a fixed order on each apply: rotation first, then horizontal flip, then vertical flip, each as its own canvas pass. Rotation amount comes from three independent sources that are summed: the Quick Rotation buttons (90 degrees clockwise, 90 counter-clockwise, 180, and 45), a draggable circular dial that reads the pointer angle via Math.atan2 and snaps to whole degrees, and a separate Straighten control with preset buttons (-5, -2, -1, 0, +1, +2, +5) plus a slider that runs from -15 to +15 degrees in 0.5 degree steps for horizon correction. The Fix Phone Orientation buttons are shortcuts that set rotation directly: Portrait to 0, Landscape Left to 90, Landscape Right to -90, and Upside Down to 180. A 3x3 grid overlay, split-versus-single preview toggle, and CSS zoom help you check alignment before exporting.

Output is always a PNG encoded at quality 1.0 regardless of the input format, and the download is named from the original file with a suffix recording the operations, for example name-rot90-flipH.png. Two consequences follow from the implementation that are worth knowing. First, because every save re-renders through the canvas and re-encodes to PNG, this is a pixel-resampling pipeline, not a metadata-only or lossless re-tag of an existing JPEG; a JPEG you rotate comes back as a (typically larger) PNG. Second, the tool reads pixel data directly and contains no EXIF orientation handling, so the rotation you choose is composed on top of however the browser already displays the source image rather than reading or rewriting the camera orientation flag.

Frequently asked questions

Does rotation affect image quality?

No. Rotating by 90° increments is a lossless operation that simply rearranges pixels. Flipping is lossless too.

Can I rotate by a custom angle?

This tool supports 90° increments and flips. For arbitrary angle rotation, use an image editor.

Private by design

Images are decoded, edited, and exported entirely inside this browser tab. No originals, exports, or metadata are uploaded.