Rotate a picture
Quarter turns, or any angle between −45° and 45°, computed once from the file you opened.
Nothing to hand?
The angle slider, the quarter turns and the corner decision appear here once a file is open. Nothing is sent anywhere to make that happen.
What this page changes
There are two different things wrong with a sideways photograph and they need different repairs. Either the samples themselves are stored turned — the top of the picture running down the left edge of the array — or the samples are the right way up and one field in the file’s metadata, the EXIF Orientation tag, claims they are not. A quarter-turn button fixes the first case. In the second case it makes things worse, because it turns pixels that were already correct and leaves the lying tag in place.
This page does both jobs and keeps them apart. Turning the picture rewrites the sample grid; where the saved file is a JPEG carrying the original camera block across, the orientation field goes with it set to 1, and where the output holds no EXIF at all — a PNG or a WebP, or a JPEG saved with the metadata box unticked — there is no field left for anything downstream to act on. Either way nothing turns the picture a second time. Repairing the tag, on the orientation page, rewrites that one field, orphans the stale preview beside it, and leaves every sample exactly where it was. Which one you need depends on whether the picture already looks right somewhere, and the tool states what it found in the file before you touch a control.
Turning a photo, step by step
- Drop a file onto the panel above, paste one with ⌘V or Ctrl+V, or open the sample seascape.
- The file is decoded on this device; the orientation tag is read and applied before anything is drawn.
- Press Left 90°, Right 90° or 180° — or the L, R and U keys — for a quarter turn.
- For a crooked horizon, drag the angle slider, or arm the guide and lay it along something that ought to be level.
- Choose whether the corners are cropped inward or padded outward. The line under the button says what each one costs.
- Press Save rotated file. The full-resolution pass runs at that moment, from the same numbers the preview was drawn from.
Files this page reads and writes
JPG, PNG, WebP, AVIF, GIF, BMP, TIFF and ICO are decoded here, TIFF through a decoder fetched the first time a TIFF arrives; HEIC pulls a WebAssembly codec on the same terms and never on a page view. What comes out keeps the format that went in wherever a browser can write it — JPG, PNG and WebP — and where it cannot, the substitute is named on the page before you save rather than discovered in a downloads folder afterwards.
And a candid list of what it will not do:
- A free-angle rotation resamples every pixel. The picture is straighter and very slightly softer, and no setting here avoids that — only a multiple of 90° is free. One qualification on that last clause, because this build has not yet earned it: the block transform that makes a quarter turn genuinely free is not in this version, so a JPEG turned by 90° here is decoded and written again like any other.
- Where a file has no orientation tag, this page does nothing and says nothing. A portrait photograph and a photograph lying on its side are the same array of numbers, and nothing short of understanding what is in the frame can tell them apart — so a missing tag is left missing rather than guessed at.
- A CMYK JPEG is declined with the reason named. No browser decodes one correctly, and changing somebody’s colours as a side effect of turning their picture is a worse outcome than refusing the file.
- An arithmetic-coded JPEG is declined for the same kind of reason: it is a legal file and no browser carries a decoder for it, so there are no pixels here to turn.
- An animated GIF or WebP is turned as a single frame in this version. Rotating every frame with its timing and disposal intact is a real piece of work and it is not done yet, so the saved file is a still picture.
- A 16-bit TIFF or PNG is turned at eight bits per channel, because that is the depth a browser canvas holds. A multi-page TIFF uses page one, and the tool says which page it took.
Questions people ask about rotating images
- Does turning a JPEG cost quality?
- In this version, yes — a quarter turn decodes the picture and writes it again, which is a second generation. The transform that would rearrange the compressed blocks without decoding anything is not in this build, and claiming otherwise would be the easiest lie on the page. The one operation here that touches no pixel is the tag rewrite on the orientation page: it edits the orientation field, zeroes the four-byte pointer that links to the stale embedded preview, and copies the picture data through unread.
- My photo is the right way up on my phone and sideways on the website I sent it to. What is going on?
- The camera did not turn the pixels when you turned the phone. It stored them as the sensor read them and wrote a field called Orientation saying how far round they need to go. Your phone reads that field; a great many upload forms, document viewers and email clients do not. Open the file on the orientation page and it will tell you which value it found and offer the repair that ends the disagreement.
- What does the trim percentage under the slider actually mean?
- It is the share of the picture's area that leaves the frame when the corners are cropped inward. Turning a rectangle by a few degrees puts triangular gaps at four corners, and the largest rectangle of the original shape that still fits inside is smaller than what you started with. The figure is computed from the geometry rather than estimated, and the pixel dimensions beside it are the exact dimensions the saved file will have.
- Can I turn a picture and keep the camera information?
- For a JPEG, yes, and it is on by default. The original EXIF block is lifted out of the file you opened and put into the file that is written, with the orientation field set to 1 and the embedded preview thumbnail unlinked so no file manager shows you a stale sideways square. Untick the box beside the quality slider and the saved file carries no metadata at all, which is the honest way to drop a GPS position.
- Why is there no button to mirror the picture?
- Because a turn and a reflection are different operations, and a tool that offers both invites you to reach for the wrong one. Rotation moves every pixel around a centre and can always be undone by rotating back. A mirror reverses handedness: text becomes unreadable, a face becomes a face that never existed. This page does the first and declines the second on purpose.
- Can I do a whole folder at once?
- Yes, on the batch page. It reads the orientation field of every file first, corrects only the ones that claim to be turned, copies the already-upright files through byte for byte rather than re-encoding them for nothing, and hands back a ZIP with a line saying what happened to each. Files with no tag are returned untouched and are never guessed at.
What the output format costs
The file that comes out is written by the browser’s own encoder, and which one is available decides what you get. A JPEG is re-compressed at the quality you set, so a turn is a second generation whatever angle it was; a PNG is written without loss and is frequently several times the size of the JPEG you opened; a WebP sits between the two and is the only one of the three that keeps an alpha channel while still compressing photographic detail properly. Where a format arrived that no browser can write — AVIF, BMP, TIFF, ICO, HEIC — the substitute is named above the save button, before you press it.
Padding outward has a cost that is easy to miss: the wedges at the four corners need a colour, and a format with no alpha channel has to be given one rather than left transparent. That is why a padded turn saved as JPEG comes back with white corners and the same turn saved as PNG or WebP comes back with nothing in them. Cropping inward avoids the question and pays for it in area instead, which is the figure printed under the slider.
Where else to go
Three other surfaces here open on the same engine with a different first screen, because three different sentences get typed into a search box and each of them deserves a different thing to be looking at one second after arriving.
- Straighten a crooked photo opens with the guide armed and the grid on, for a horizon or a leaning building.
- Fix the orientation tag reads the field before offering anything, and explains which of the two repairs the file in front of you actually needs.
- Correct a folder at once for a camera-roll dump or a stack of scans that all carry the same defect.
- If you would rather read than click, why photos turn sideways online explains the whole mechanism in about four minutes, and the eight orientation values draws what each legal reading of the field means inside the file.
- Both of those, with a note on what each covers and what neither of them does, are indexed on the reference page.