[WECHAT .DAT TO JPG]

Turn WeChat's scrambled .dat image files back into normal pictures — a whole folder at once.

Last updated

WeChat for PC saves the images you receive as .dat files that no image viewer can open. They are your ordinary photos with every byte scrambled by a one-byte key — obfuscation, not real encryption — so they can be converted back exactly, with no quality loss. Choose some .dat files or a whole WeChat image folder below.

[CONVERT WECHAT .DAT TO JPG]

Converted in your browser — nothing is uploaded. One file downloads as an image; several download as a ZIP.

[WHERE WECHAT KEEPS THE .DAT FILES]

On Windows, with WeChat 3.x, received images are under your Documents folder:

Documents\WeChat Files\<your WeChat ID>\FileStorage\Image\2024-05\
Documents\WeChat Files\<your WeChat ID>\FileStorage\MsgAttach\<chat>\Image\2024-05\

Pick the Image or MsgAttach folder with the "whole folder" button: every .dat file inside, in every month folder, is converted, and the folder structure is kept in the ZIP. Thumb folders hold small previews of the same pictures.

WeChat 4 for PC stores its files elsewhere (an xwechat_files folder) and in a different format — see below.

If you moved the storage location, WeChat shows the real one: open the menu (☰, bottom left) → Settings → File Management (the exact label varies by version), then Open Folder.

[WHAT THE OTHER FOLDERS HOLD]

Only images are scrambled. Everything else in FileStorage is either a normal file or not something a converter can help with (folder names from WeChat 3.x for PC; they can differ between versions):

Folder Contents What to do
Image, MsgAttach…ImageChat pictures as .datConvert them here
MsgAttach…ThumbSmall previews as .datConvertible, but low resolution; use the Image folder when it has the same picture
VideoReceived videos, usually plain .mp4Open them directly; nothing to convert
FileDocuments sent in chats, in their original formatOpen them directly
Voice messagesNot loose files: kept inside WeChat's own encrypted databases (SILK audio)Not convertible here; forward or play them in WeChat

A picture you never opened in WeChat may exist only as a thumbnail: the full image is often downloaded only when you view it. Open the chat, tap the picture once, and a full-size .dat appears in Image.

[WHY SOME FILES CANNOT BE CONVERTED]

  • WeChat 4 images. Newer WeChat for PC versions encrypt images with AES, using a key that stays inside the running app. Those files start with a different marker and are reported as skipped. Open them in WeChat and use Save As.
  • Other .dat files. Databases, caches and settings in the same folders are not images and are left alone. Many other programs use the .dat extension too — see identifying a .dat file.

[HOW THE CONVERSION WORKS]

Every image format begins with a fixed signature — a JPEG with FF D8 FF, a PNG with 89 50 4E 47. WeChat XORs every byte of the file with the same key byte, so the first bytes of a .dat file reveal the key: XOR them with the expected signature and the key falls out. Applying the same XOR to the whole file restores the original image, bit for bit.

Three formats are recognised this way: JPEG, PNG and GIF, which covers nearly everything WeChat sends. A .dat whose first bytes do not match one of those signatures under any key is reported as skipped, never guessed at.

Converted files keep their name with the right extension, so 4f1c…e2.dat becomes 4f1c…e2.jpg. If two files would end up with the same name, the second gets -2. The ZIP stores images without recompressing them, so it is about the size of the folder and quick to build.

This happens in your browser. The images never leave your computer, which matters for private chat photos. For very large folders (tens of thousands of files), convert one month folder at a time so the browser does not run out of memory.

[HOW TO CONVERT WECHAT .DAT FILES TO JPG]

Convert WeChat .dat image files back to normal images in your browser.

  1. Find the image folder. Open Documents\WeChat Files\<your WeChat ID>\FileStorage\Image on your PC.
  2. Select files or the folder. Use "Choose .dat files" for a few images, or "Or a whole folder" to convert everything inside it.
  3. Save the images. One file downloads as a JPG, PNG or GIF; several download together as a ZIP that keeps the folder structure.

[FREQUENTLY ASKED QUESTIONS]

Are my WeChat images uploaded?

No. The conversion runs in your browser and the images never leave your computer.

Is the converted image the original quality?

Yes. The conversion reverses the scrambling exactly, so the result is byte-for-byte the image WeChat received.

Why are some files skipped?

Files from WeChat 4 for PC use real AES encryption with a key held inside the app, so they can only be exported from WeChat itself. Files that are not images, such as caches, are skipped too.

Can I tell when a picture was received?

Roughly. WeChat 3.x sorts images into month folders such as 2024-05, and the file modification date is usually when the image was saved. The converted files take the date of the download, so note the month folder before converting if dates matter.

Does this work for WeChat on a phone?

Phone WeChat keeps images inside its private app storage. Save images from the chat on the phone, or use WeChat for PC and convert the .dat files there.