The two matrices
Both operations move samples without changing their values, and both are described by a two-by-two matrix applied to each coordinate. A reflection about the upright axis maps a point at x to the frame width minus x and leaves y alone. A reflection about the horizontal axis does the reverse. A rotation of a quarter turn maps x to y and y to the negative of x, which is why it swaps the frame dimensions and a reflection never does.
The determinant is the honest way to tell them apart. A rotation has determinant one; a reflection has determinant minus one. Handedness survives a rotation and is destroyed by a reflection, which is the formal statement of the thing everybody actually notices: a turned photograph still shows a watch on the correct wrist, and a reflected one does not.
Where they coincide
There is exactly one case where the two produce the same grid: a reflection on both axes lands every sample where a half turn would have put it. Composing two reflections gives a determinant of minus one times minus one, which is one — a rotation. That identity is why image editors so often present both under the same menu, and why people reach for a flip when what they wanted was a turn.
It holds only for the half turn. A quarter turn in either direction cannot be built out of reflections about the frame axes, because it swaps the width and the height and no composition of those two reflections ever does. If the picture you have is sideways rather than upside down, no combination of flips on this site will fix it, and reading that sentence early is worth more than any control on the page.
Which one you actually need
The test is what is wrong with the picture. If text in the picture is unreadable in a mirror-writing way, it has been reflected and needs reflecting back. If the text is readable but the picture is on its side or upside down, it has been turned and needs turning back — a different operation, with its own edge cases around the orientation flag and around losing quality on a JPEG, and one this site deliberately does not perform. That work belongs to rotatepictures.com, which does it properly rather than as a fifth button on a mirror.
The confusing case is a picture that is both. A phone photograph that arrived upside down has been through a half turn; because that is the same grid as two reflections, either operation returns it. Any other combination needs the turn first and the reflection second, and doing them in the other order will not land where you expect.
What the file records
A photograph carries an orientation flag with eight possible values, and only four of them are pure rotations. The other four are mirrored states, which means a file can describe itself as reflected without any pixel ever having been moved. A tool that reflects before resolving that flag produces a picture that is correct in one viewer and wrong in the next, and the difference will not show up until someone opens it somewhere else.
This site resolves the flag at decode time, applies the reflection to the resolved picture, and writes the export with the flag set to one. That means the file you save describes itself as needing no correction at all, which is the only description that is true of it.
Where to go next
- Flip a picture
One axis, both axes, or one half onto the other.
- Reflect top to bottom
The axis most often mistaken for a turn.
- Why your selfie is reversed
A reflection you did not ask for and cannot see happening.