Last updated: June 22, 2022
In developing the M8, Leica created a digital lens coding system which works together with the camera's firmware to correct vignetting. But when an excessive infrared sensitivity was discovered, "cyan corner" correction was added for use with UV/IR filters and later "red edge" correction on the M9. The coding also provides the focal length and lens identity in the EXIF info of your images. So even if a lens doesn't require corrections, it's worth coding if for nothing else... Knowing which lens it was shot with. To work properly, this system combines the lens code with the framelines that are brought up by the lens mount. It works across all digital M bodies, including the M8, M8.2, M9, M9-P, M Monochrom and the newest M (Type 240).
The codes are permanently encoded on most newer Leica lenses through the use of physical pits on the lens mount flange, which are then filled with either white (off/0) or black (on/1) paint. If you have an older Leica lens, you can send it in and for a nominal charge, Leica will add this coding. Those who use third-party lenses are somewhat at a disadvantage as none are coded from the factory. Thankfully there are a number of solutions. The simplest is temporary and free - requiring using a template and a black permanent ("Sharpie") marker or paint to apply the code. Older lenses have a flat surface on the mounting flange, which causes the code to wear off with lens changes. Not long ago, both Vogtländer and Zeiss have started machining a very light groove on the flange - which is just enough to hold the code and not wear off. You can see an example of this in the image above.
To code third-party lenses permanently as Leica lenses are, you have two options. You can send your lens to a Leica repairperson (e.g. Don Goldberg) who can machine the pits into the existing mounting flange, or replace the flange entirely with one from a machinist (e.g. Jon Milich or via eBay). Jon machines these flanges precisely out of brass and are of a very high quality. As a result, they are on the expensive side (he can also machine your existing flange if you wish). The flanges available from eBay are generally out of China and of varying quality, but quite inexpensive. Make sure that they are correct for your lens not only in screw locations but the framelines it brings up.
Read more about Converting to a Coded M Lens Mount in our comprehensive article.
This table lists the codes used by Leica. Readings are made by placing the lens with the pattern at 12 O'Clock, and reading clockwise. The "Other Lenses" column lists lenses which are known to benefit from the same coding as the Leica lens in the "Lens Name" column. The "Framelines" column indicates the primary framelines the lens code works with. Some lens codes work with more than one (and retain the correct EXIF focal length/aperture), so if you have any additional frames to be added, please let us know.
The framelines indicated as "24/35" are for M8 bodies. For M9 and later, consider them "35/135" instead. Therefore we list these as "24/35 or 35/135" below.
Lens Name | Black | Chrome | Code | Picture | Framelines | Other Lenses |
Tri-Elmar-M 16-18-21mm f/4 ASPH | 11626 | - | 010000 | ⬜⬛⬜⬜⬜⬜ | 28/90 | Voigtländer 15mm f/4.5 (@16mm) |
Super-Elmar-M 18mm f/3.8 ASPH | 11649 | - | 110100 | ⬛⬛⬜⬛⬜⬜ | 50/75 | Zeiss Distagon T* 4/18 ZM |
Super-Elmar-M 21mm f/3.4 | 11145 | - | 110011 | ⬛⬛⬜⬜⬛⬛ | 28/90 | |
Elmarit-M 21mm f/2.8 | 11134 | - | 000001 | ⬜⬜⬜⬜⬜⬛ | 28/90 | Konica M-Hexanon 21-35mm f/3.4-4.0 (1) Voigtländer 21mm f/1.8 Ultron |
Elmarit-M 21mm f/2.8 ASPH | 11135 | 11897 | 011000 | ⬜⬛⬛⬜⬜⬜ | 28/90 | Voigtländer 21mm f/4 Color Skopar Zeiss Biogon T* 2.8/21 ZM Kobalux 21mm f/2.8 |
Summilux-M 21mm f/1.4 ASPH | 11647 | - | 101111 | ⬛⬜⬛⬛⬛⬛ | 28/90 | |
Elmar-M 24mm f/3.8 ASPH | 11648 | - | 110010 | ⬛⬛⬜⬜⬛⬜ | 24/35 or 35/135 | Voigtländer 25mm f/4 Snapshot Skopar |
Elmarit-M 24mm f/2.8 ASPH | 11878 | 11898 | 011001 | ⬜⬛⬛⬜⬜⬛ | 24/35 or 35/135 | Zeiss Biogon T* 2.8/25 ZM (with mount fix) |
Summilux-M 24mm f/1.4 ASPH | 11601 | - | 110000 | ⬛⬛⬜⬜⬜⬜ | 24/35 or 35/135 | |
Tri-Elmar-M 28-35-50mm f/4 ASPH | 11890 11625 |
11894 | 101010 | ⬛⬜⬛⬜⬛⬜ | 28/90, 24/35, 50/75 | |
Elmarit-M 28mm f/2.8 (III) | 11804 | - | 000011 | ⬜⬜⬜⬜⬛⬛ | 28/90 | |
Elmarit-M 28mm f/2.8 (IV) | 11809 | - | 011011 | ⬜⬛⬛⬜⬛⬛ | 28/90 | |
Elmarit-M 28mm f/2.8 ASPH | 11606 | - | 011100 | ⬜⬛⬛⬛⬜⬜ | 28/90 | Zeiss Biogon T* 2.8/28 ZM Konica M-Hexanon 28mm f/2.8 |
Summicron-M 28mm f/2 ASPH | 11604 | - | 011010 | ⬜⬛⬛⬜⬛⬜ | 28/90 | Voigtländer 28mm f/1.9 Ultron Voigtländer 28mm f/3.5 Color Skopar Zeiss Biogon T* 2.8/25 ZM |
Summarit-M 35mm f/2.5 | 11643 | - | 101011 | ⬛⬜⬛⬜⬛⬛ | 24/35 or 35/135 | Voigtländer 35mm f/2.5 Color Skopar |
Summicron-M 35mm f/2 (IV) | 11310 | 11311 | 000110 | ⬜⬜⬜⬛⬛⬜ | 24/35 or 35/135 | Zeiss Biogon T* 2/35 ZM Minolta M-Rokkor 40mm f/2.0 (3) |
Summicron-M 35mm f/2 ASPH | 11879 | 11882 | 011110 | ⬜⬛⬛⬛⬛⬜ | 24/35 or 35/135 | Voigtländer 35mm f/1.7 Ultron |
Summilux-M 35mm f/1.4 ASPH | 11874 | 11883 | 011101 | ⬜⬛⬛⬛⬜⬛ | 24/35 or 35/135 | Voigtländer 40mm f/1.4 Nokton |
Elmar-M 50mm f/2.8 | 11831 (11824) |
11823 | 100010 | ⬛⬜⬜⬜⬛⬜ | 50/75 | |
Summarit-M 50mm f/2.5 | 11644 | - | 101100 | ⬛⬜⬛⬛⬜⬜ | 50/75 | Voigtländer 50mm f/2.5 Color Skopar |
Summicron-M 50mm f/2 (III) | 11817 | - | 010111 | ⬜⬛⬜⬛⬛⬛ | 50/75 | Konica M-Hexanon 50mm f/2 |
Summicron-M 50mm f/2 (IV, V) | 11819 11826 |
11825 11816 |
100001 | ⬛⬜⬜⬜⬜⬛ | 50/75 | Zeiss Planar T* 2/50 ZM |
APO-Summicron-M 50mm f/2 (VI) | 11141 | - | 101001 | ⬛⬜⬛⬜⬜⬛ | 50/75 | |
Summilux-M 50mm f/1.4 (II) | 11868 | 11856 | 000101 | ⬜⬜⬜⬛⬜⬛ | 50/75 | |
Summilux-M 50mm f/1.4 ASPH | 11891 | 11892 | 100000 | ⬛⬜⬜⬜⬜⬜ | 50/75 | Voigtländer 50mm f/1.5 Nokton Zeiss C Sonnar T* 1.5/50 ZM |
Noctilux-M 50mm f/1 | 11821 11822 |
- | 011111 | ⬜⬛⬛⬛⬛⬛ | 50/75 | |
Noctilux-M 50mm f/0.95 ASPH | 11602 | - | 110001 | ⬛⬛⬜⬜⬜⬛ | 50/75 | |
Summarit-M 75mm f/2.5 | 11645 | - | 101101 | ⬛⬜⬛⬛⬜⬛ | 50/75 | Voigtländer 75mm f/2.5 Color Heliar |
APO-Summicron-M 75mm f/2 ASPH | 11637 | - | 100100 | ⬛⬜⬜⬛⬜⬜ | 50/75 | |
Summilux-M 75mm f/1.4 | 11810 11814 11815 |
- | 100011 | ⬛⬜⬜⬜⬛⬛ | 50/75 | |
Macro-Elmar-M 90mm f/4 | 11633 | 11634 | 100111 | ⬛⬜⬜⬛⬛⬛ | 28/90 | |
Macro-Adapter-M | 14409 | - | 101000 | ⬛⬜⬛⬜⬜⬜ | 28/90? | |
Tele-Elmarit-M 90mm f/2.8 (II) | 11800 | - | 000100 | ⬜⬜⬜⬛⬜⬜ | 28/90 | Konica M-Hexanon 90mm f/2.8 (2) |
Elmarit-M 90mm f/2.8 | 11807 | 11808 | 100110 | ⬛⬜⬜⬛⬛⬜ | 28/90 | |
Summarit-M 90mm f/2.5 | 11646 | - | 101110 | ⬛⬜⬛⬛⬛⬜ | 28/90 | |
Summicron-M 90mm f/2 (II) | 11136 | 11137 | 000111 | ⬜⬜⬜⬛⬛⬛ | 28/90 | |
APO-Summicron-M 90mm f/2 ASPH | 11884 | 11885 | 100101 | ⬛⬜⬜⬛⬜⬛ | 28/90 | |
Elmarit-M 135mm f/2.8 (I/II) | 11829 | - | 001001 | ⬜⬜⬛⬜⬜⬛ | 28/90 | |
APO-Telyt-M 135mm f/3.4 | 11889 | - | 110101 | ⬛⬛⬜⬛⬜⬛ | 35/135 |
(1) | Coding for 21mm only; you must start camera with preview in 28mm position and use that position when shooting. This lens uses a 6-screw mount, but the extra screws are outside the coding area. Unfortunately, this lens uses a 35mm frame position, which is not compatible with any Leica 21mm lens code. |
(2) | Typically no coding necessary; a screw provides the 1. |
(3) | Clip the frameline lug (so as to show 35mm frames). |
Mike Prevette discovered that by marking lenses in the correct spot with a black marker, the M8 will actually read the above codes, and use the internal settings for the lens whose code was marked. This is handy not only for marking the above lenses without actually sending them in for coding, but also for marking "similar" lenses and getting some benefit of the coding even for older Leica or other non-Leica lenses.
To help mark the lenses in the correct spot, Bob Blakley originally created this template with the instructions:
Print it out; the gray surround should be exactly 2 inches by 2 inches. Cut out all the white parts. The cutout at lower left aligns with the little recessed slot in the lensmount; the holes then represent the code bit positions. It's easiest to get on if you cut the recessed-slot piece all the way through to the edge of the paper so you can just open the template up and slip it on. I've made it a nice shade of magenta :-) If you want a template you can use over and over again, I'd suggest a trip down to Office Depot to get some overhead transparencies to print the template on. That way your Sharpie won't damage the template (a Sharpie is a brand of permanent black marker).
You might want to download this newer, larger and better template instead however.
Bo Lorenson is offering a pre-made cardboard template for sale in M8 coder - simple manual handcoding of M lenses.
Our suggestion would be to purchase a proper coding kit, such as the Coder Kit L 3.0 or Coder Kit CV/ Z 1.0 from Match Technical. Made of long-lasting materials and contains a pen and all the info necessary for coding.
Here's a little known "feature" (read: bug) that has to do with the fact that the camera reads not only the 6-bit code from the lens - but also the framelines brought up. It just so happens that if you push the frame preview lever on the camera towards the lens, the camera might determine it's a different or uncoded lens! This does not work by moving the lever away from the lens. It also varies lens-by-lens and what framelines it brings up in the first place. So you'll have to experiment... Why bother? Consider that if you're lucky - you can, on a shot-by-shot basis "uncode" your lens to let the vignetting show through in all its glory! Just push the lever in and take your shot. Of course, any other corrections such as for "cyan corner" or "red edge" are also negated.
This happens because of the engineering required to accommodate the Leica MATE and WATE lenses. Since they're not true zoom lenses but rather three different and specific focal lengths - the focal length chosen is indicated by the framelines.
The new Leica M can utilize R system lenses through the use of the appropriately named R-Adapter M. These are the lenses that have in-camera profiles:
Adobe Camera Raw (ACR) which is utilized by Photoshop and Lightroom, has profiles for Leica lenses that correct for vignetting and distortion. The proper profile selection relies on lens coding, which tags the appropriate fields in the EXIF data (e.g. focal length). The separately available DNG Flat Field plug-in does as well. Check the Adobe website for a full list of supported lenses.
What follows is the Leica Camera press release regarding lens coding from mid-2006:
Leica Camera AG, Solms will be giving the lenses of the Leica rangefinder system a new code on the bayonet ring in future to enable the planned digital Leica M camera to recognize the lens type. The information on the lens that is being used helps the camera to optimize image quality. All lenses leaving the factory from July 1st, 2006 onwards will have the new coding, although they can still be fully used with the current analog cameras LEICA MP and LEICA M7 as well as classic models built after 1954. Lenses in the current range as well as many earlier models can be retrofitted at the cost of the owner to benefit from the image optimization in the camera. The lenses are compatible with the planned digital M camera even without retrofitting, except that the additional features cannot be used.
The lens coding is called ‘6-bit coding‘ because six fields in the bayonet ring are marked in black or white to represent a number from 1 to 64 in binary code. The planned digital M camera reads this information optically and can identify the lens on the basis of this code. Apart from the improvement in image quality, this information is also written into the EXIF image file.
“On account of their legendary quality, nearly all Leica M lenses are ideal for digital use. However, the new 6-bit coding also uses the performance reserves in the image processing of the camera to give our customers the excellent image result they expect from Leica,“ says Rainer Bültert, product manager for the M system at Leica Camera AG.
Lenses bought in the past will be converted at the request of the customer for 95 euros at the Customer Service of Leica Camera AG in Solms or the Leica agencies of other countries.
Many of the lenses made from 1963 onwards can be converted. A list of such models is available on the following pages or from the Leica Info-Service (Tel. 06442/208-111). The only lens in the current range that will not be given a 6-bit coding is the LEICA APO-TELYT-M 135 mm f/3.4. It is not codable later, either, as its extension factor of 1.33 makes it unsuitable for use on the planned digital M camera. The launch of the digital Leica rangefinder camera is planned for the second half of 2006.
List of present lenses that can be updated
Name Color Order no. Delivered from Elmarit-M 21mm f/2.8 ASPH. Black 11135 1997 Summicron-M 28mm f/2 ASPH. Black 11604 2000 Summilux-M 35mm f/1.4 ASPH. Black 11874 1994 Summicron-M 35mm f/2 ASPH. Silver 11882 1996 Summilux-M 50mm f/1.4 ASPH. Black 11891 2004 Summicron-M 50mm f/2 Black 11826 1994 Elmar-M 50mm f/2.8 Black 11831 1995 Summilux-M 75mm f/1.4 Black 11810 1998 Apo-Summicron-M 90mm f/2 ASPH. Black 11884 1998 Macro-Elmar-M 90mm f/4 Black 11633 2002 Macro-Adapter M Black 14409 2002 Discontinued lenses that can be updated
Besides those presently available, even lenses that were discontinued quite a while ago can be updated (see list below). Since Leica Camera AG regards system compatibility as a vital virtue, many lenses introduced as long ago as 1963 can be updated.
Name Color Order No. Delivered from-until Elmarit-M 21mm f/2.8 Black 11134 1980-1997 Elmarit-M 21mm f/2.8 ASPH. Silver 11897 1997-2004 Elmarit-M 24mm f/2.8 ASPH. Silver 11898 1996-2005 Elmarit-M 28mm f/2.8 Black 11804 1979-1992 Elmarit-M 28mm f/2.8 Black 11809 1992-2005 Tri-Elmar-M 28-35-50mm f/4 ASPH. Black 11890 1998-2000 Tri-Elmar-M 28-35-50mm f/4 ASPH. Silver 11894 1999-2000 Summilux-M 35mm f/1.4 ASPH. Silver 11883 1994-2004 Summicron-M 35mm f/2 Black 11310 1979-1996 Summicron-M 35mm f/2 Silver 11311 1993-1996 Noctilux-M 50mm f/1.0 Black 11821 1975-1994 Summilux-M 50mm f/1.4 Black 11868 1992-2004 Summilux-M 50mm f/1.4 Silver 11856 1992-2004 Summicron-M 50mm f/2 Black 11817 1969-1979 Summicron-M 50mm f/2 Black 11819 1979-1994 Summicron-M 50mm f/2 Silver 11825 1992-1994 Summilux-M 75mm f/1.4 Black 11814 1980-1982 Summilux-M 75mm f/1.4 Black 11815 1982-1998 Summicron-M 90mm f/2 Black 11136 1980-1989 Summicron-M 90mm f/2 Silver 11137 1993-1989 Apo-Summicron-M 90mm f/2 ASPH. Silver 11885 2002-2004 Tele-Elmarit-M 90mm f/2.8 Black 11800 1973-1989 Elmarit-M 90mm f/2.8 Silver 11808 1997-2004 Elmarit-M 135mm f/2.8 Black 11829 1963-1997 Please ask either your authorized Leica dealer or Customer Service in Solms to perform the update. The latter will be happy to inform you on this subject. Customer Service is available under the phone number +49 (0)6442 208-189.
The original table was posted on Carsten Whimster's site and with thanks to Sean Reid, Jan Dvorak, Dante Stella and others who had made it possible. Through a community effort, additional codes have been discovered and logged... Therefore, if you have lenses to add or find mistakes, please contact us and we'll update the table.