Images

Rotate and Flip Image Guide: Angles, Mirrors, EXIF and Batch Export

·

Rotating turns an image; flipping reflects it across an axis. ToolMellow applies clockwise quarter turns and horizontal or vertical flips to local JPG, PNG and still WebP images. Choose up to 20 files, set the shared transformation and output format, then inspect the results and download individual images or a batch ZIP.

The browser first decodes each source with its image orientation, then applies the chosen turn and flips in the rotated output axes. Export re-encodes the pixels. This guide explains angle and mirror differences, batch ordering, transparency, quality, metadata and failure recovery without treating a newly encoded image as the original file.

Rotate & flip image

Load images and choose a shared transformation

Use Choose images or drop supported files into the workspace. Local preview reading starts automatically; wait until it settles before processing. The default angle is 0, both flips are off, Output format is Keep source format, quality is 90 and JPG background is white. The rotate tool has no crop rectangle or resizing controls.

Choose Rotate clockwise and the postrotation flip checkboxes, then press Rotate / flip images. These choices apply to every selected image. Inspect each result’s output dimensions and preview before downloading. Changing settings or editing the queue clears previous results, so apply the transformation again for a revised batch.

  • Keep original images separately before generating new encoded versions.
  • Use an asymmetric subject or readable text when checking turn and mirror direction.
  • Inspect every result, especially when the batch mixes dimensions, formats or transparency.

Still-image formats and separate batch limits

Inputs are JPG, PNG or still WebP. Header checks reject animated PNG/WebP and unsupported types, rather than trusting an extension. GIF, SVG, HEIC, PDF and video are not inputs to this tool. There is no clipboard-image paste, remote URL or cloud-drive importer here; use a supported still-image export when needed.

Limits apply to each full source before transformation; changing orientation does not bypass them. Header dimensions and decoded dimensions are checked, and a supported-looking header can still fail decoding. File bytes use decimal MB, not MiB. The encoded-output budget is separate from the input total and is checked before a completed batch is returned.

Still-image formats and separate batch limits
BoundaryMaximum
Files in one job20
Each encoded source25000000 bytes, inclusive
Each decoded image24000000 pixels
Either source side12000 pixels
Combined source files100000000 bytes, inclusive
Combined encoded images100000000 bytes, inclusive

MDN: File API and user-selected filesMDN: createImageBitmap orientation and decoding options

Quarter turns and output dimensions

Rotate clockwise offers 0, 90, 180 or 270 degrees. A positive quarter turn turns the image clockwise on the screen. A 270-degree clockwise turn reaches the same direction as a 90-degree counterclockwise turn. The control does not accept a fine-angle straighten operation such as 1 or 45 degrees.

Angles 90 and 270 swap width and height; 0 and 180 retain them. Horizontal and vertical flips do not change dimensions. The source-to-output line predicts the geometry using the decoded source, while the result card reports the actual encoded dimensions. Keeping the dimensions does not imply keeping original encoded bytes or metadata.

Quarter turns and output dimensions
Clockwise angleA 900 by 600 source becomes
0°900 × 600
90°600 × 900
180°900 × 600
270°600 × 900

MDN: Canvas clockwise rotation and transform origin

Distinguish a turn from a mirror reflection

Rotation moves all pixels around the image center without reflecting the subject. Flip horizontally after rotation swaps left and right in the current rotated image, making a mirror view. Flip vertically after rotation swaps top and bottom. A readable sign makes the horizontal-mirror difference easy to see; a turn and a reflection are different operations.

Both flips together are equivalent in geometry to a 180-degree turn of the rotated result. A single flip can reverse the subject’s handedness even when its frame looks upright. Check text, logos and directional details before using the output. The tool reflects the entire decoded image and does not let you mirror only a selected layer or object.

Distinguish a turn from a mirror reflection
ChoiceEffect after the selected rotation
Horizontal flipLeft and right swap
Vertical flipTop and bottom swap
Both flipsBoth axes reflect; same geometry as another half turn

MDN: Canvas scale and negative-axis reflections

Worked pixel-grid examples show why order matters

The order is decoded source orientation, the chosen clockwise turn, then flips in the rotated axes. The grid below uses a two-column, three-row source with distinct pixel labels A through F. Slashes separate rows; they are a compact notation for the example, not a text format exported by the tool.

After a 90-degree turn, the output has three columns and two rows. Applying a horizontal flip now changes those rotated rows, rather than reflecting the original source first. Use the postrotation checkbox labels literally. These examples describe geometry; they do not promise that a JPG encoder preserves exact original color values.

Worked pixel-grid examples show why order matters
OperationRows in the resulting grid
Source, 0° and no flipsA B / C D / E F
90° clockwiseE C A / F D B
90° then horizontal flipA C E / B D F
90° then vertical flipF D B / E C A
180° and no flipsF E / D C / B A
270° and no flipsB D F / A C E

MDN: Canvas clockwise rotation and transform originMDN: Canvas scale and negative-axis reflections

EXIF orientation comes before your controls

The decoder requests imageOrientation from-image, so supported source orientation metadata is applied when creating the bitmap. A phone photo can therefore already look upright in its input preview even if the stored JPEG pixel matrix was recorded sideways. The displayed source width and height describe that decoded, oriented bitmap.

Your selected rotation and flips are additional transformations of that displayed source, not edits to an EXIF tag. Processing a camera image at 0 degrees still re-encodes its decoded appearance. The exported image does not copy the original camera orientation metadata, so assess the resulting pixels in the intended viewer rather than assuming two independent EXIF rotations will be preserved.

MDN: createImageBitmap orientation and decoding options

Edit the queue while retaining the selected angle

Every image uses the same global rotation and flip settings; there are no per-file angle buttons in this workspace. Use the up and down buttons to change order, Remove to drop a file, or Sort by filename and Reverse order for a larger queue. These edits clear generated results and retain the current shared angle, including when you later change that angle.

Filename sorting uses the interface language with numeric comparison and base sensitivity. For ordinary names such as img2.png and img10.png, numeric ordering puts 2 before 10; accent and case treatment can vary by language. It is not a universal bytewise filename order. Inspect the queue before processing because the result numbering and batch order follow it.

Edit the queue while retaining the selected angle
Queue actionResult
Move up or downChanges one file’s position
RemoveDrops that source from the current job
Sort by filenameLanguage-sensitive numeric name ordering
Reverse orderReverses the current list

MDN: localeCompare and language-sensitive ordering

Choose output format and transparency behavior

Keep source format detects each input’s actual header type and encodes its result in that format. A mixed-format batch can therefore produce JPG, PNG and WebP outputs together. Explicit JPG, PNG or WebP chooses one output type for all files. The source-format option preserves the type choice, not original bytes or metadata.

PNG and supported WebP output retain transparent pixels through canvas rendering. JPG fills the output with JPG background before drawing the transformed image, flattening transparency onto that color. The background starts white and does not flatten PNG/WebP output. Review translucent edges against the real surface where the result will appear.

Choose output format and transparency behavior
OutputAlpha and encoding
JPGOpaque result using selected JPG background
PNGAlpha retained; lossless encoding of rendered canvas
WebPAlpha retained with supported browser encoding; quality can be lossy

MDN: OffscreenCanvas image encoding and quality

Lossless geometry is different from lossless file rotation

Quarter turns and flips change the pixel arrangement without resizing the image. PNG encodes the rendered canvas losslessly, but browser decoding and color/alpha handling still separate that canvas from the original encoded file. PNG output does not recover detail already lost in a JPG source or certify original profile, hidden transparent RGB or file-byte identity.

JPG and WebP are re-encoded by the browser and can lose detail. This is not a JPEG coefficient-level lossless rotation tool. Repeatedly exporting a newly generated lossy image can compound changes; return to the original for another edit. No crop or resample control is offered here; use Image cropper or Image resizer separately if that is the intended change.

MDN: createImageBitmap orientation and decoding optionsMDN: OffscreenCanvas image encoding and quality

Quality, file size and metadata are separate decisions

Quality starts at 90 and ranges from 10 to 100. It is an encoder request for JPG/WebP, not a percentage of detail preserved or a target file size. Explicit PNG selection disables the slider. With Keep source format, it can remain enabled even for a PNG input or mixed batch; PNG encoding ignores the lossy quality parameter while applicable formats use it.

The output can be larger than the source, even when rotation leaves the same number of pixels. Compare actual encoded bytes in each result card. Original camera/location metadata is not copied by this tool, while canvas encoders can write their own format metadata. Do not treat the result as a metadata-free file or a color-managed print conversion.

MDN: OffscreenCanvas image encoding and quality

Check each image and download individual files or a ZIP

The input preview is a PNG thumbnail with its longest side at most 640 pixels and no enlargement of smaller inputs. The recorded source dimensions remain full size, and the export worker reads the actual source rather than rotating the small thumbnail. Input thumbnails do not show your final rotation; inspect the processed result preview and dimensions.

Generated filenames use cleaned source basenames, a new format extension and a queue prefix: photo.png exported as JPG in first position becomes 01-photo.jpg. Each result has Download, Resize image and Make a PDF actions. For more than one result, Download all as ZIP saves toolmellow-images.zip, and Make one PDF deliberately hands the batch to JPG to PDF. ZIP stores the encoded files; its wrapper can add bytes beyond the encoded-image budget.

MDN: OffscreenCanvas image encoding and quality

A failed file prevents a completed batch result

The worker processes the batch and returns its result list only after every image finishes successfully. If one file fails header checks, decoding, transformation, encoding or output-budget checks, the page displays the error and does not expose a partial completed batch. Remove the problem file or correct the settings and run the remaining job again.

Preview failures do not guarantee that processing is blocked once preview reading settles; the export worker validates sources again. If a browser falls back to PNG for an unsupported requested encoder, the tool checks the MIME type and reports an error rather than mislabeling it. The 60-second timeout covers the whole job, not each image separately. Smaller batches can help when processing or memory limits are reached.

MDN: OffscreenCanvas image encoding and qualityMDN: Using Web Workers

Clear files, cancellation and handoffs have different scopes

Clear files removes the queue, source previews, generated results and per-file state while retaining shared output choices such as rotation, flips, format, quality and background. Adding a new batch uses those retained choices. Setting or queue changes clear old results without automatic reprocessing. To return to no turn or reflection, choose angle 0 and turn off both flip checkboxes.

Cancel terminates the processing worker and leaves the original selected files available; it does not recall downloaded files or restore a previous generated batch. Refreshing or leaving discards workspace state. Resize/PDF buttons pass chosen generated files through a deliberate one-time in-memory handoff in the same tab, subject to the destination tool’s own limits.

MDN: Worker termination

Local processing and practical rotation choices

Files are selected on the device; previews, transformations and image encoding run in a local browser worker. No image-upload calculation endpoint or remote-image URL workflow is provided by this tool, and it does not persist an edit project. Ordinary website hosting, asset and analytics requests remain separate; local image processing does not imply anonymous browsing or zero logs.

For a sideways picture, start from its decoded preview and try a quarter turn. For a mirror selfie or reversed design, inspect whether a single horizontal flip is intended, especially for text. To straighten a slightly tilted horizon, edit one object, preserve source JPEG coefficients or process animation, choose a tool with those explicit capabilities rather than treating a supported still quarter turn as an equivalent operation.

MDN: File API and user-selected filesMDN: Using Web Workers

Embed the rotate and flip workspace with a visible backlink

Use Add this tool to your website on the localized tool page to copy or download the supplied HTML snippet. Keep its interactive iframe, sizing behavior and visible ToolMellow backlink, including the existing link attributes. Choose the intended language before copying its localized snippet and give the frame enough usable space on your page.

The embed uses the same controls, shared settings, formats and job limits. Visitors select their own files and download their own results; it is not an API for automatically transforming images hosted by your webpage. Test the embedded workflow in the browsers and layout you intend to support, and keep the ToolMellow credit link visible.

Common questions

How do I rotate an image online?

Choose supported local images, wait for preview reading to settle, select Rotate clockwise and optional flips, then press Rotate / flip images. Inspect each result before downloading one image or the completed batch ZIP.

What is the difference between rotating and flipping?

A rotation turns the image around its center. A horizontal flip swaps left and right; a vertical flip swaps top and bottom. A single reflection can mirror text and handedness even when the frame looks upright.

Does 90 degrees swap image width and height?

Yes. A 90- or 270-degree turn swaps the decoded source width and height. Angles 0 and 180 retain them, and flips do not change dimensions. The tool does not offer arbitrary-angle straightening.

Do flips apply before or after rotation?

After rotation, in the rotated output axes. A 90-degree clockwise turn followed by a horizontal flip is different from horizontally flipping the source before turning it. Inspect an asymmetric subject or the worked grid examples.

Why does my photo already look rotated when loaded?

The decoder requests orientation from image metadata when present. Your controls act on that decoded, oriented appearance. They do not simply write another EXIF orientation tag into the original file.

Is image rotation lossless?

The quarter-turn and flip geometry does not resize. PNG losslessly encodes the rendered canvas, while JPG/WebP are re-encoded and can lose detail. This is not an original-byte or JPEG coefficient-level lossless rotation tool.

Can I rotate images without resizing?

Yes. This workspace rotates or reflects the full decoded image without resize controls. A quarter turn swaps dimensions while keeping the pixel count. Use Image resizer separately when you need new dimensions.

Can I rotate a transparent PNG?

Yes. PNG output preserves existing alpha through rendering, and supported WebP can also retain alpha. JPG flattens transparency onto the selected JPG background. A format change does not recover lost source detail.

Can every file in a batch use a different angle?

The visible rotation and flip controls are shared by all files. This workspace has no per-image angle buttons. Split files into separate jobs when they need different transformations.

How do filename sorting and queue changes affect rotation?

They change order or remove files and clear previous results while retaining the current shared angle. Later angle changes still apply to every remaining image. Filename sorting uses the interface language with numeric comparison.

What happens when one image in a batch fails?

The page reports the error without exposing a partial completed batch. Remove the unsupported or damaged file or adjust settings and process again. The whole job has a 60-second timeout and separate input/output budgets.

Can I embed the rotate and flip tool?

Yes. Copy the localized HTML from Add this tool to your website, retain the iframe and visible ToolMellow backlink, and test its size on your webpage. Visitors still select and process their own files locally.

Does Keep source format preserve camera metadata?

No. It chooses each detected input format for a new encoded image. Source camera/location metadata is not copied, although the output encoder can add its own format metadata. Keep originals when metadata matters.

What does Clear files reset?

It removes files, previews and generated results while retaining shared rotation, flips, format, quality and background. Choose angle 0 and disable both flips explicitly if you need an untransformed next batch. Already downloaded files remain on your device.

Sources and further reading

Put it into practice.

Related guides