CorelDRAW CDR Signature Format: Introduction & Recovery


Type code JPEG
File extension .cdr
Type of format Vector
Compression ZIP
Numerical Format Little-endian
Magic number 52 49 46 46
Developer Corel Co.
Release Date 1989

CDR file format was developed by Corel Co. in 1989, and it was an entirely proprietary Corel file format.

It was mainly used for vector graphic drawings, and it could be recognized by the "WL", the first two starting bytes of the file. With CorelDRAW 3, CDR has changed its format and its name to a Resource Interchange File Format (RIFF) envelope.

The new format could have been recognized by the four starting bytes ("RIFF") of the file, and by the "CDR*vrsn" in bytes 9 to 15. Corel continues to be the proprietary owner of the data chunk of the RIFF file format.

Any RIFF container, including CDR drawing must have a signature (tag) RIFF (hex: 52 49 46 46) at the beginning of the file. RIFF files are organized into data segments (chunks). Each section is prefixed with a 12-byte header: 4-byte signature (RIFF), 4-byte data size (little-endian order, low byte first) and 4 byte RIFF Type: signature CDR*.

A closer look at the CorelDRAW image

When inspecting sample.cdr file's data using any Hex Viewer, like Active@ Disk Editor (included within Active@ File Recovery), we can see it starts with a signature RIFF (hex: 52, 49, 46, 46). At offset 8 there is a signature of CorelDRAW Drawing RIFF Type CDR9 (hex: 43, 44, 52, 39), which means CDR file's version is 9.

At offset 4 there is a data size: 20,088 (hex: 78, 4E, 00, 00) in little-endian order (low byte first). Adding header length to the data size, we calculate a total CDR file size: 20,088 + 8 = 20,096.

CDR example