Lossless or Redraw: two ways to strip metadata from an image
In short: JPEG Lossless removes targeted metadata segments without recompressing the image. Redraw decodes a supported image and exports its pixels into a new file without copying the original metadata blocks. Technical encoder fields can remain; neither method guarantees that every possible identifying signal has disappeared.
Two different ideas of “removing metadata”
There are two approaches to removing personal metadata from a photo. One is surgical: find the parts of the file that hold metadata and remove them, leaving the rest untouched. The other is to start over: decode the picture into pixels and encode those pixels into a new file, which only contains what the encoder writes.
delexif offers both, as Lossless and Redraw. Redraw is the default because it works for every supported format; Lossless is available for JPEG files.
How Lossless works
A JPEG file is a sequence of segments, each starting with a two-byte marker that says what it contains. Lossless reads the file segment by segment and removes the targeted segments below; technical and unrecognized application segments can remain:
| Segment | Contains | Lossless |
|---|---|---|
| APP1 | EXIF (including GPS) and XMP | Removed |
| APP13 | IPTC (Photoshop blocks) | Removed |
| COM | Free-text comments | Removed |
| APP2 (MPF) | Index of extra images stored after the main one | Removed |
| APP2 (ICC) | Color profile | Kept |
| Tables and scan data | The compressed image itself | Kept, byte for byte |
Because the compressed image data is copied as it is, nothing is re-encoded: the compressed pixels have no generation loss and the file usually gets slightly smaller.
Lossless also stops copying at the end of the main image. Many phones and cameras append more data after it — preview images, the gain map used for HDR display, or the video part of a “motion photo” — and those extras carry metadata of their own. They are not copied, so the clean file contains only the main picture.
The trade-off: orientation
Phones can store photos in the sensor’s orientation and write an EXIF tag saying how to rotate or mirror them for display. Lossless removes the whole EXIF block, including that tag. When delexif detects an EXIF orientation that changes the display, selecting Lossless shows a specific warning beside the method controls. Choose Redraw, the default method, to apply the displayed rotation or mirroring to the pixels before saving. Lossless deliberately does not retain the orientation metadata.
How Redraw works
Redraw decodes the image the way the browser would display it — with its orientation applied — paints it onto a blank canvas and exports the canvas as a new file. The new file is written by the browser’s encoder rather than by copying the original metadata segments. That prevents those segments from being carried over, but the encoder can write its own technical metadata: the HTML standard specifies 96 dpi when the format supports resolution fields. HEIC is decoded first and exported as JPEG, PNG or WebP.
With Redraw you also choose the output:
- Format: JPEG, PNG or WebP. HEIC photos are converted, since browsers cannot write HEIC; JPEG is the most compatible choice.
- Quality: from 40% to 100% for JPEG and WebP, 92% by default. PNG is lossless and has no quality setting.
HEIC needs one extra step: most browsers cannot decode it, so delexif loads a HEIC decoder compiled to WebAssembly the first time a HEIC file is cleaned. It runs in the page like the rest of the tool; the image is still not uploaded.
The trade-offs: quality and color
- Re-encoding is lossy for JPEG and WebP. At 92% the difference is hard to see, but each re-encode discards a little detail. Keep your original if you will edit the photo again.
- File size changes. The new file can be larger or smaller than the original, depending on the format and quality you choose.
- Color profiles are not carried over. The canvas works in the browser’s standard color space, so a photo with a wide-gamut profile can look slightly less saturated after Redraw. Lossless keeps the profile.
Large photos and memory safeguards
delexif accepts files up to 64 MiB each. Redraw is limited to 25 megapixels and 8192 pixels per side: a 6000 × 4000 image fits, while an 8000 × 6000 image exceeds the pixel limit. JPEG, PNG and WebP dimensions are checked from their headers before pixel decoding; HEIC dimensions are checked before allocating the output pixel buffer and asking the decoder to render it.
These are the tool’s own safeguards, not universal browser limits or a promise that every image below them will work. If Redraw rejects a large JPEG, choose Lossless to avoid decoding its pixels, and review the orientation warning. For other formats, export a lower-resolution copy or use a desktop metadata tool. delexif does not resize an oversized image silently.
Images are processed serially. The tool releases image bitmaps, canvas backing stores and HEIC image handles after use, including processing failures. ZIP downloads are limited to 96 MiB of generated files; cards identify files left out of the archive so you can download them individually or use a smaller batch.
Which one to choose
| Situation | Method |
|---|---|
| A JPEG you want to keep at full quality | Lossless |
| PNG, WebP or HEIC | Redraw (the only option) |
| The clean JPEG appears rotated | Redraw |
| You also want a smaller file or a different format | Redraw |
| You want a new file without copying original application segments | Redraw |
How the result is checked
After cleaning, delexif reads the new file again with the same parser it used on the original, and the card says what it found:
- “checked: no personal metadata detected” — the output was read and no recognized location, device, capture or authorship fields were detected, with no appended data found for JPEG. It does not certify every possible metadata field.
- An amber warning — something is still there, and the card says what. Trying Redraw usually solves it.
- A partial or failed inspection warning — the tool could not establish the full supported check, so an empty summary must not be treated as confirmation that nothing remains.
If Lossless cannot read a JPEG’s structure (a damaged or unusual file), delexif falls back to Redraw automatically and says so on the card.
A reproduced Lossless comparison
Use this synthetic 1 × 1 pixel JPEG, select Lossless in delexif and compare your download with the expected JPEG. The checked result on 21 October 2026 was:
Input: 1,359 bytes
Lossless output: 633 bytes
EXIF / XMP / COM segments: removed
Bytes after the main JPEG: 23 → 0
Compressed JPEG scan data: unchanged
JFIF technical fields: retained
The reproduction record includes hashes and scope. This uses the actual JPEG sanitizer and structure reader, with an independent read of the sample’s metadata fields by exifr. No ICC profile is present in this particular sample, so it does not itself demonstrate color-profile preservation.
This tiny fixture tests file structure, not visual quality, HDR, orientation or the Redraw encoder. For a visual comparison, use a non-private photo with fine detail and a known orientation: export both modes, reopen each result, compare the same crop, and inspect the downloaded files. Redraw bytes and file size can vary with browser and quality settings; a single universal output hash would be misleading.
Sources and scope
Primary documentation checked on 21 October 2026. The downloadable example is synthetic; the recorded test does not establish the behavior of every photo, device or sharing service.
- WHATWG HTML: serializing canvas bitmaps — encoder output and technical resolution metadata.
- Adobe XMP specifications — where XMP packets live in supported file formats.
- CIPA standards — Exif and Multi-Picture Format structures.
Try both on the same photo in delexif and compare the results. Everything runs in your browser: the image is never uploaded by the tool.