Flip Image

Published Updated

Mirror your image horizontally or vertically and download the result in seconds — free, private, and processed entirely in your browser.

Mirror in one direction, keep the size

A flip does not change the size of the picture. The image is redrawn on a canvas with the same width and height and one axis reversed. In a horizontal flip the pixel in column x lands in column width minus x minus 1, and a vertical flip does the same for rows.

Typical reasons to flip: undoing a mirrored selfie, fixing a scan placed face down, building a symmetrical layout, or checking how artwork looks when reversed.

What a flip does to each pixel

The tool moves the canvas origin to one edge and mirrors an axis, with scale(-1, 1) for a horizontal flip and scale(1, -1) for a vertical one, then draws the picture (HTML Living Standard, canvas). In a picture W pixels wide, the pixel in column x ends up in column W - 1 - x. Measured with the page's own transform code in Chromium 152 on an opaque 1,200 × 800 test image saved as PNG, all 960,000 pixels landed where that mapping says, with no mismatch. Flipping twice gave the original back exactly, and a horizontal flip followed by a vertical one matched a 180° turn exactly.

Which direction fixes what

What you seeUse
Left and right are swapped and lettering is mirror-writtenHorizontal
Picture is upside down and lettering is mirrored top to bottomVertical
Picture is upside down but the letters are not mirroredRotate 180° in Rotate Image
Picture is sidewaysRotate 90° in Rotate Image

Flipping an image

  1. Step 1

    Add an image

    Any picture your browser can show. The preview lists the pixel size and file size.

  2. Step 2

    Choose the direction

    Horizontal mirrors left to right. Vertical turns the picture top to bottom. One direction per run.

  3. Step 3

    Pick a format and flip

    PNG is the default and the only lossless choice. JPEG and WebP are written at quality 92. The file is saved as name-flipped.

Choosing the output format

FormatQualityUse it for
PNGLosslessGraphics, screenshots and anything you will edit again.
JPEGQuality 92Photos where size matters. No transparency: transparent areas become white.
WebPQuality 92Web use, smaller files. Keeps transparency.

The output format is your choice and does not have to match the input. Metadata such as camera data is not carried over, because the picture is redrawn.

Measured: what the output format costs

The same 1,200 × 800 synthetic photo was flipped horizontally as a PNG and as a JPEG at quality 92, and a second photo of 1,203 × 797 pixels as a JPEG. Each result was compared pixel by pixel with an exact mirror of the decoded input. PSNR is a score for how close two pictures are, where a higher number means closer.

Output and test imagePixels that differLargest change in one channelPSNRFile size
PNG, 1,200 × 8000 of 960,0000identical1,931,727 to 1,932,114 bytes
JPEG 92, 1,200 × 80013,423 (1.4%)2 of 25568.1 dB305,762 to 306,920 bytes
JPEG 92, 1,203 × 797854,677 (89.1%)16 of 25538.4 dB307,500 to 320,799 bytes

A JPEG flip is nearly free when width and height are multiples of 16, and noticeably less free when they are not. A likely reason is the block grid: JPEG codes a picture in 8 × 8 blocks (ITU-T T.81, the JPEG standard), and the mirror of a picture that fits the grid fits it again. This is one synthetic image per size, so read it as a pattern. For the details of lossy and lossless formats, see the guide JPG, PNG, WebP, HEIC and SVG: which image format to use. If every pixel of an opaque picture without a colour profile must survive, choose PNG: in our test it kept every pixel. In a test PNG with partly transparent pixels, the opaque pixels were kept, fully transparent pixels were saved as transparent black, and the partly transparent pixels changed (75% of them in Google Chrome 158, 97% in Firefox 155), because a canvas may not hold semi-transparent colours exactly.

Phone photos and animated files

A photo that carries a rotation tag is flipped as the browser shows it. A test JPEG stored as 400 × 300 with an orientation tag of 6 was displayed by Chromium as 300 × 400, and the flipped result was 300 × 400 as well, with the tag not written back. CSS defines this behaviour for the image-orientation property, whose default is to apply the tag (CSS Images Module Level 3). An animated GIF becomes one still picture in the format you choose, because the output options are PNG, JPEG and WebP.

Flip image questions

Does flipping reduce image quality?

With PNG output of an opaque picture without a colour profile, no: the pixels are only moved. With JPEG or WebP the picture is encoded again at quality 92, which is a small loss. If your source is a JPEG and you want to avoid that, pick PNG and accept the larger file.

Can I flip both ways in one go?

Not in one run. Flipping horizontally and then vertically is the same as turning the picture 180 degrees, so use Rotate Image with Rotate 180°, or run the tool twice.

Will text in the picture be mirrored?

Yes, a horizontal flip reverses any lettering in the image. Flip a mirrored photo once and the text reads correctly again.

What is the difference between flipping and rotating?

Flipping mirrors the picture along an axis and reverses left and right, or top and bottom. Rotating turns it without mirroring. Rotating by 180 degrees equals a flip on both axes.

Does the size of the image change?

No. The output has exactly the same width and height as the input.

Why did my flipped JPEG change more than I expected?

JPEG re-encoding is gentler when width and height are multiples of 16. In our two test images, a 1,200 × 800 photo had 1.4% of its pixels change by at most 2 levels, while a 1,203 × 797 photo had 89% change by up to 16 levels. Block alignment is a likely reason, but that is one image per size. For an opaque picture without a colour profile, choose PNG if you need the pixels unchanged: in our test it came back with no changed pixel. Partly transparent pixels can change.

What happens to the rotation tag of a phone photo?

The tool flips the picture the way your browser shows it, so a portrait phone photo stays portrait. The result has the rotation already applied to its pixels and no tag, as a test file with orientation 6 showed: 300 × 400 in, 300 × 400 out.

Will the flipped file be bigger or smaller?

Slightly different. In a test, a PNG grew from 1,931,727 to 1,932,114 bytes, and a JPEG at quality 92 grew from 305,762 to 306,920 bytes, or from 307,500 to 320,799 for a photo whose size was not a multiple of 16. The change was 4.3% or less in these tests.

Is there a size limit when I flip to JPEG or WebP?

Yes, 65,500 pixels a side for JPEG and 16,383 for WebP. A 65,535 x 8 strip set to JPEG got a message naming that limit and no file in Google Chrome 156, Chromium 153 (Playwright build, not Google Chrome), Firefox 155 and Playwright's WebKit build (not the Safari app). The page sets no such limit for PNG.

Related Tools