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. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

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

Quarter turns and mirrors as exact permutations, checked by decoding the output and comparing it with what went in. A free angle is marked as the resample it is, and the EXIF Orientation tag is read and named.

Edits stay in your browserMore image processingJump to full guide

Initializing in your browser…

You might also like

Image to Base64

Turn an image into a data URL whose payload is decoded again and compared byte for byte with the file, with the media type taken from the file's own signature rather than its extension and the size cost of embedding stated in full.

Image Diff Comparator

Compare two images with a perceptual engine (pixelmatch) that ignores anti-aliasing, or an exact byte engine. Groups changes into regions with bounding boxes, reports SSIM, and handles size mismatches with an explicit policy.

Image Cropper

Whole-pixel crops with the rectangle typed or dragged, checked by decoding the output and comparing it with the pixels that went in. Quarter turns and mirrors are exact permutations, so nothing is clipped.

Image Rotation & Flip: a worked example

A 301 by 199 picture, turned a quarter and then turned 45 degrees, so the difference between the two kinds of rotation is on one screen.

Input

xy-odd.png 301 x 199 · quarter turn right, then the same picture at 45 degrees
What Image Rotation & Flip produces

Output

quarter turn   199 x 301   exact: largest channel difference 0
45 degrees     354 x 354   a resample; 64,896 empty corner pixels
45 + auto crop 140 x 140   no empty pixels, and 67% of the area gone

A quarter turn is a permutation: every output pixel is an input pixel moved, and the page confirms it by decoding the output and comparing it with what went in. Forty-five degrees is not, and the page says so rather than calling both of them rotation. The bounding box at 45 degrees is 353.553 pixels, rounded UP to 354; truncating it, which is what assigning width * |cos| + height * |sin| to a canvas does, would lose a sliver of the picture. Cropping the corners away is offered and costs two thirds of the area here, so it is a checkbox with the number beside it rather than a default.

About Image Rotation & Flip

A rotation by a multiple of 90 degrees and a mirror are the only geometric operations on an image that lose nothing at all. Every output pixel IS an input pixel, moved: nothing is averaged, interpolated or clamped, and the output has exactly the same set of pixel values as the input in a different order. This page performs them as index permutations rather than as canvas transforms, so the output size comes from the operation and cannot be got wrong, and it checks the result: the output is decoded again and compared with the transformed pixels, and the verdict panel says whether the largest single-channel difference is 0. A free angle is a different operation and the page keeps the two apart. At 30 or 45 degrees every output pixel falls between four source pixels and has to be interpolated, so the picture is softened and the corners are empty. The verdict says so, in those words, rather than describing both cases as "rotation".

How to use

  1. 1Upload an image
  2. 2Use the quarter turn and mirror buttons for anything that is a multiple of 90 degrees
  3. 3Use the straighten slider or the dial for a fine angle, and decide what happens to the corners
  4. 4Pick an output format: PNG keeps the pixels of an exact turn exactly, JPEG and WebP do not
  5. 5Read the verdict panel, which says whether this result is exact and why not when it is not
  6. 6Download

Where this helps

  • A sideways phone photo

    A quarter turn costs nothing: the page confirms the largest channel difference is 0 rather than asking you to take it on trust.

  • Straightening a scan

    A small angle with the corners cropped away, and the page says how much area that cost.

  • Mirroring a selfie

    A mirror is exact and the dimensions do not change.

  • Preparing a print

    Turn to portrait, keep PNG for exact pixels, and read what the source metadata was before it went.

Key features

  • Quarter turns and mirrors as index permutations, so nothing is interpolated
  • The output is decoded again and compared with what went in, and the page states the verdict
  • A free angle from -45 to +45 degrees, marked as a resample rather than described as a rotation
  • The bounding box for a free angle is rounded up, so no sliver of the picture is truncated away
  • Empty corners left transparent, filled, or cropped to the largest inscribed rectangle
  • PNG, WebP and JPEG output, with the size of each shown and a warning when the file grows
  • The EXIF Orientation tag read, named from CIPA DC-008, and explained
  • Both the stored and displayed sizes when an orientation tag makes them differ
  • Whether a lossless container rotation of this JPEG would have been possible at all

Tips & best practices

  • A multiple of 90 degrees is free; anything else is not. The verdict panel tells you which one you just did.
  • PNG keeps an exact turn exact. JPEG and WebP re-encode, and the page reports how far the pixels moved.
  • Crop the corners only when you want them gone: it discards real picture, and the page says how much.

What is exact and what is not

The output box for a free angle is the exact bounding box of the rotated rectangle, rounded UP. That matters: a 301 by 199 turned 45 degrees needs 353.553 pixels on each side, and assigning width * |cos| + height * |sin| straight to a canvas truncates it to 353, throwing away a half-pixel sliver of the picture. Rounding up keeps it, at the cost of a row of empty pixels.

Empty corners can be left transparent, filled with white or black, or cropped away. Cropping takes the largest axis-aligned rectangle with the source aspect ratio that fits inside the turned picture, which is a real loss of area, so it is a checkbox rather than a default and the page says what fraction of the original area survives. In a format with no alpha channel there is no transparent option at all, and the page says the corners will be solid rather than letting you find out after downloading.

The EXIF Orientation tag is read and named. CIPA DC-008 defines eight values, and four of them include a mirror, so they are not eight rotations. Every current browser applies the tag when it draws an image, which means the pixels this page receives are ALREADY oriented: a photograph taken sideways arrives the right way up, and a turn you add here is on top of that rather than instead of it. The page states the tag, its meaning from the specification, and both sizes when the stored size differs from the displayed one. The output carries no orientation tag, because a canvas cannot write one, and it does not need one: the pixels are stored the way they are shown.

One thing this page does not do, and says so. A JPEG whose stored dimensions are a whole number of 16 by 16 minimum coded units can be turned a quarter IN ITS CONTAINER, moving the entropy-coded blocks without decoding anything, which is what jpegtran -rotate does and is lossless in the JPEG sense. This page decodes and re-encodes, so it tells you whether your file would have allowed a container rotation, and points at PNG for a result whose decoded pixels are exact. Metadata does not survive either way here: the picture goes through a canvas and comes back as bare pixels.

Frequently asked questions

Does rotation affect image quality?

A quarter turn or a mirror does not: every output pixel is an input pixel moved, and the page proves it by decoding the output and reporting a largest channel difference of 0. Two things can still cost you. A lossy output format re-encodes the picture, and the verdict says so. And a free angle is an interpolation, which softens fine detail.

Can I rotate by a custom angle?

Yes, from -45 to +45 degrees with a slider or a dial, on top of any quarter turn. It is marked as a resample because that is what it is.

Why is my rotated JPEG so much bigger?

Because the default output is PNG, which is lossless and has to store the JPEG artefacts as though they were detail. A 63.6 KB JPEG can come back as a 648.5 KB PNG. Choose JPEG or WebP if the size matters more than exactness; the page warns when the output grew.

Is a JPEG rotation ever lossless?

It can be, but not here. A JPEG whose stored dimensions are a whole number of minimum coded units (16 by 16 pixels with the usual chroma subsampling) can be turned in the container with jpegtran, moving the coded blocks without decoding them. This page decodes and re-encodes, so it tells you whether your file would have qualified rather than leaving the question unasked.

What about the EXIF orientation flag?

It is read and named. The browser has already applied it before the pixels reach this page, so the picture you see is the right way up and any turn you add is on top of that. The output has no orientation tag and does not need one, because its pixels are stored the way they are displayed.

Related tools and how they differ

  • Image Cropper: Crops with the rectangle typed in whole pixels, and does its quarter turns with the same exact permutation this page uses.
  • Image Metadata Viewer: Reads the EXIF Orientation tag along with everything else a photograph carries, without changing anything.
  • Image Format Converter: Changes format and opens the output to say what it is; use it if you want the same picture in a different container.

Private by design

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