Tool guides and practical topics/Images, files and local processingRotate or mirror an image: 90°, operation order and PNG outputCheck rotation and horizontal-flip order with six colored pixels, and distinguish visible orientation, EXIF tags and static PNG export.Content reviewed · 2026-11-16The problem and contextA sideways phone photo, inverted scan or mirrored screenshot starts with the browser’s decoded view. EXIF orientation may affect display while the stored pixels follow another order. Exporting the rotated view as PNG writes that orientation into the output pixels rather than merely changing a tag.Method and calculationEach turn is 90°; four clockwise turns restore the starting orientation. A horizontal flip swaps the current view’s left and right, while a vertical flip swaps top and bottom. Rotation and reflection do not freely commute. Integer transforms exchange width and height at a quarter turn without adding rotational interpolation.Worked exampleLabel a 3-by-2 image ABC / DEF. A clockwise turn gives DA / EB / FC, now 2-by-3. Flipping that visible result horizontally gives AD / BE / CF. Flipping the original first and then turning clockwise instead gives FC / EB / DA. Compare the original, preview and downloaded pixels in that order.ChecklistPNG is a static bitmap. SVG is rasterized, animated formats use the default frame, and source EXIF metadata is not copied. Transparency can remain, while color decoding and semitransparent pixels depend on the browser. For Base 64 of the original bytes, use the image Base 64 converter without a rotation export.Rotate and flip imagesUpload imageChoose an image fileDrop an image here. Choosing another file replaces the current image.Browser-decodable images, including raster formats, SVG, AVIF and ICO. Up to 64 MiB, 16384 pixels per side and 32 million pixels total.90° counterclockwise90° clockwiseFlip horizontallyFlip verticallyReset orientationClearOriginal imageImages are processed locally. Output is a static PNG with transparency; original EXIF and other source metadata are not copied.Use these tools with this articleImage Base64 ConverterEncode PNG, JPEG, GIF, WebP and BMP, or restore the original image from Base64.Image CompressorResize images in your browser, export JPEG, PNG or WebP, compare actual file sizes and choose a JPEG background for transparent areas.Image Rotate & FlipRotate by 90° or flip the current view, compare it with the original, then download PNG.Sourceshtml.spec.whatwg.org · 1www.w3.org · 2