I have a Canon EOS 85mm f/1.2 L II lens. I sold it to someone, they claim it was broken and sent it back. I am trying to prove that the lens I sent to them, is not the one they returned.

From http://regex.info/exif.cgi

Lens Info   85mm f/?
Lens Model  EF85mm f/1.2L II USM
Lens Serial Number  0000020f30

My lens has a six digit number XXXXXX. How can I convert 0000020f30 or extract to get the 6 digit serial number?

  • 1
    @Zlatty - right, but if you shipped it intact and it arrived damaged, then assuming no fraud, the situation would be that it must have been damaged in shipping. But now that you know it is fraud on the part of the recipient you have to deal with the mess rather than the shipper. Hopefully you can make a strong enough case to avoid whoever you did the sale through from giving them their money back.
    – AJ Henderson
    Jan 10, 2014 at 20:33
  • 1
    I always take a photo of stuff that I sell. I know I'm paranoid, but now at least I know that I'm also being chased :-).
    – fejesjoco
    Jan 11, 2014 at 10:44
  • 2
    Could you not attach the lens to your camera, take a picture then compare the serial numbers in the EXIF
    – BenFord
    Jan 15, 2014 at 13:11
  • 1
    Just as a thought - the serial number wasn't on the paperwork when you bought it, was it? I noticed on my paperwork from when I last properly splashed out on a lens that it was recorded there. Jan 15, 2014 at 14:26
  • 1
    You could also check the date code to see if they are different.
    – Viv
    Jan 17, 2014 at 16:46

2 Answers 2


I tried the Jeffrey's EXIF viewer with three images taken with the same camera (a Canon 50D) and three different lenses. The 'Internal Serial Number' value returned by Jeffrey's EXIF Viewer was the same value for all three images taken with the same camera and three different lenses. Each image was taken with, respectively, a Tamron SP AP 17-50mm f/2.8 XR Di-II, an EF 70-200mm f/2.8 L IS II, and an EF 28-135mm f/3.5-5.6 IS. The two Canon lenses were correctly identified in the "Lens Model" field (The Tamron was identified as a "Canon EF 28-70mm f/2.8L or Sigma or Tamron Lens" because many Tamron and Sigma lenses are known to spoof the lens ID for the older EF 28-70mm f/2.8L). This leads me to believe the "Internal Serial Number" value is a reference to the camera body, not the lens (at least on older Canon bodies that do not differentiate between two different copies of the same lens model for various purposes such as AFMA). Even though the the lens ID immediately precedes the "Internal Serial Number" value, it may not accurately reflect the serial number of the lens used to create the image. Images taken with my 7D using two different lenses shared the same "Internal Serial Number" with each other, a different number than the three images taken with three lenses using the 50D shared. Images taken with my 5D mark II have a blank "Internal Serial Number" value when using Jeffrey's EXIF Viewer.

Many Canon camera bodies have a separate internal serial number that doesn't match the one stamped on the exterior of the camera, at least not when the number in the EXIF is translated using a standard hex to decimal converter. This may also be the case regarding lens ID numbers with bodies that can differentiate between two different copies of the same model lens.

The value for 'Camera Serial Number' in the EXIF maker notes of images taken with my Canon 50D is 5AA411141. Using a standard converter yields a decimal value of 24331227457. Yet the Serial number stamped on the camera body is 1520708485. This number is correctly reported by Digital Photo Professional as the camera's serial number. Irfanview reports the serial number as "1520708485 (5AA411141)". Hmmm. The HEX number that correlates to the stamped serial number 1520708485 is "5AA42B85". The first four digits match, but the rest doesn't? This is very interesting, though, because (HEX) 2B85 = (Decimal) 11141! Thus it seems the internal number in the EXIF information is a combination of hex and decimal digits! A four digit hex number (in my case "5AA4") followed by the decimal equivalent of the rest of the hex form of the entire serial number (in my case 11141 which is the decimal equivalent of 2B85)!

The Value for my 7D and 5D II work exactly the same way. If I convert the camera's serial number to Hex, then convert the last four hex digits back to decimal, I get the same value that the maker notes show for the camera serial number: The first four digits of the 8-digit hex number followed by the decimal equivalent of the last four digits of the 8-digit hex number.

Although it doesn't help your situation, the best practice when selling a lens anywhere near the value of an EF 85mm f/1.2 L would be to document the serial number of the lens and the condition it is in before you ship it.

  • 3
    It looks as if things are far more complex than I assumed from the appearance of the code. +1 for the detailed research.
    – neil
    Jan 11, 2014 at 19:14
  • This is a very informative answer. Thanks on the explanation. In my case, LensSerialnumber matched from 1 shot this summer to one taken last Friday. Same lens different bodies. Upon trying a 5DMIII and another 85mm lens, a different serial number showed up.
    – Zlatty
    Jan 13, 2014 at 18:15
  • 1
    The behavior seems to be body specific with regard to lens ID in the EXIF info. The same cameras that can differentiate between two of the same model lens for AFMA purposes appear to be the ones that accurately report the "Lens Serial Number" in the 'Maker Notes'. But the internal number may not be the same as the number stamped on the lens.
    – Michael C
    Jan 13, 2014 at 19:52

This number looks like a hexadecimal number. If you put it into a convertor such as this one it will give you a decimal number - in this case 134960. The conversion may or may not be as simple as this but this does give a 6 digit number.

  • 1
    Not necessarily. 'Hex' IDs reported by Canon components are sometimes a blend of a hex and a decimal number combined to look like one number.
    – Michael C
    Jan 11, 2014 at 3:06
  • 1
    I tried this method, and it did not correlate to the lens that I've just tested.
    – Zlatty
    Jan 11, 2014 at 3:31
  • 1
    What body are you using?
    – Michael C
    Jan 11, 2014 at 6:20
  • 1
    This was with a 5Dm3. Converting it to HEX did not yield a matching number on the lens. However, the same value was shown on another 5Dm3 and the 85mm lens.
    – Zlatty
    Jan 13, 2014 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.