Encode Leica M lenses — Get the most out of your glass
Share
Community tip: Macfilos
In-depth article on 6-bit coding and EXIF tweaking for third-party lenses.
Table of contents
- What is 6-bit coding?
- What does coding actually do for you?
- Which lenses benefit?
- Methods compared
- Step-by-step guide — including complete code table
- Common mistakes and practical tips
1. What is 6-bit coding?
Six tiny fields on the mount ring. Black or white. That’s enough for a digital Leica to recognize the lens.
Leica introduced this system in 2006 with the M8 — the first digital M camera. There are no electrical contacts between camera and lens in the M system. Instead, six indentations on the mount flange are filled with either black or white paint. This creates a binary code: six positions, 64 possible combinations. The camera reads this code purely optically — via an infrared LED and photo sensor in the body.
Black absorbs infrared light (= 1), white reflects it (= 0). The sensor reads the sequence clockwise from the 12 o’clock position. Sounds simple — it’s worked reliably for almost 20 years.
Practical tip: Which cameras read the code?
All digital Leica M bodies from the M8 (2006) onward: M8, M8.2, M9, M-E, M Monochrom, Typ 240, M-P, M10, M10-P, M10-R, M10 Monochrom, M11, M11-P, M11 Monochrom. On the SL2 and SL3, the code works via the original Leica M adapter L.
Newer Leica lenses (from around 2006) come coded from the factory. The indentations are machine-milled and permanently painted. Older Leica lenses, Voigtländer, Zeiss ZM, TTArtisan, 7Artisans, and other third-party lenses don’t have this code. That’s exactly where retroactive coding comes in.
2. What does coding actually do for you?
Four things happen as soon as your camera identifies the lens. All four improve your shooting — some massively, some subtly.
EXIF data: order instead of guessing
Without a code, the metadata shows “Unknown Lens” or nothing at all. Focal length, aperture — no info. Anyone using 15 different lenses and wanting to filter by lens in Lightroom knows the frustration. With coding, the camera automatically writes the correct lens model into every single file.
Automatic image correction: vignetting, color shift, distortion
This is the most tangible advantage. Digital Leica bodies store internal correction profiles for every coded lens. This corrects vignetting (the dark corners), chromatic aberration, and the notorious “Italian Flag” effect directly in the camera. Wide angles under 35mm benefit noticeably.
Hack: Smart coding of third-party lenses
Zeiss ZM 35mm f/2 Biogon? Code it as Leica Summicron-M 35mm f/2 ASPH. The focal length and aperture match, and the vignetting correction fits closely. It doesn’t have to be perfect — the correction profile covers most of it.
IBIS on SL2 and SL3: a must, not a luxury
This is the point many underestimate. The Leica SL2 and SL3 have an in-body image stabilizer (IBIS). It absolutely needs the focal length to compensate correctly. Without coding, the camera guesses — or doesn’t stabilize at all. If you mount a 90mm lens and the camera assumes 50mm, the IBIS actively blurs your image.
Sure, you can set the focal length manually in the menu. If you forget after changing the lens, the next 200 shots are rejects. Coding solves this automatically. Do it once, never think about it again.
Attention: Adapter choice for the SL
The original Leica M-Adapter L passes the 6-bit code to the SL. Many third-party adapters (e.g., from K&F Concept, TTArtisan) do not. If you want IBIS and automatic recognition, you need the original adapter.
Workflow: No more menu clicking
Without code: change lens, go to menu, select focal length manually, confirm, back. Annoying with three lens changes a day. Unbearable with ten. Coded lenses are recognized immediately — just mount and shoot.
Video: Why you absolutely should code (especially on SL2/SL3)
Jonathan Harris from Worldwide Camera Exchange explains the advantages and shows the coding process with the Akara kit.
3. Which lenses benefit?
Short answer: any M-mount lens without factory coding on any digital Leica.
Older Leica lenses (Pre-2006)
Summicron 50mm f/2 Version IV, Summilux 35mm f/1.4 Pre-ASPH, Elmarit 28mm f/2.8 — the classics everyone knows and loves. Often optically on par with current designs. But on the M10 or M11 they remain “invisible” until you code them. The correction profiles turn an already good lens into an even better one.
Voigtländer VM/ZM
The Cosina-made Voigtländer lenses are the insider tip in the M universe. Nokton 35mm f/1.2, Ultron 35mm f/2, APO-Lanthar 50mm f/2 — optically top-notch, priced at a fraction of Leica. Uncoded from the factory. Some newer models have slight grooves on the flange to better hold the applied paint. Code them as the next Leica equivalent (same focal length, similar aperture).
Zeiss ZM
Planar 50mm f/2, Biogon 35mm f/2, C Sonnar 50mm f/1.5. Zeiss even published an official recommendation list showing which Leica profile fits which ZM lens. The PDF can be found at zeiss.com under the ZM product pages.
China brands: TTArtisan, 7Artisans, Thypoch
Even the affordable third-party brands benefit massively. TTArtisan 50mm f/1.4 on the M11 without code: no EXIF, no correction, confusing IBIS on the SL. With code: a completely different user experience. The correction profiles aren’t perfect — but 80% improvement instead of 0% is a clear win.
4. Methods compared: How does the code get onto the lens?
There are four ways. Each has its place — depending on budget, skill, and durability requirements.
| Method | Cost | Durability | Difficulty | Reversible? |
|---|---|---|---|---|
| Leica factory service | approx. 260 EUR | Permanent (milled) | Send in | No |
| Match Technical (flange replacement) | approx. 80-120 EUR | Permanent | High (disassembly) | Yes (reversible) |
| Encoder kit (e.g. Ausgeknipst, Akara) | approx. 30-50 EUR | Durable in everyday use | Very easy | Yes |
| DIY (Sharpie + paper stencil) | under 5 EUR | Low (rubs off) | Medium | Yes |
The Leica tool is the premium option: milled notches, professionally painted, including cleaning. Makes sense for a 5,000 EUR Noctilux. Less so for a 300 EUR Voigtländer.
Match Technical offers replacement flanges with pre-milled coding notches. Solid solution, but you have to partially disassemble the lens. Not for everyone.
For most users, an encoder kit is the sweet spot: snap on the precise stencil, fill in the dots, done. No tools, no disassembly. The paint holds up reliably in everyday use and can be removed without residue if needed.
DIY with Sharpie and paper stencil works — but it’s fiddlier than it sounds. Hitting the exact positions without a stencil takes patience. And most markers shine too much for the IR sensor.
Step 5: Coding with the Ausgeknipst encoder kit
Step 1: Look up the code
Find your lens in the code table (included in the kit, also on our product page). Third-party lens? Choose the Leica lens with the same focal length and similar aperture.
Step 2: Clip on the encoder
Attach the encoder to the bayonet flange and snap it in place. The stencil fits perfectly and shows you the six positions. Nothing wobbles.
Step 3: Fill in the dots
Use the included Edding 8400 to fill in the black fields according to the code. White fields remain free — the bare metal reflects the IR light correctly. One dot takes one second.
Step 4: Remove encoder, test
Remove the stencil, mount the lens on the camera. The correct lens should now appear in the menu or live view. If not: touch up the dots, make sure no black has spilled onto a white field.
Pro tip: Screw at a coding position?
Some lenses have a locking screw at one of the six positions. No problem: fill the screw with a dab of white paint or nail polish. If the code requires a black dot there, simply paint over it black after it dries.
Complete 6-bit code table
Find your lens (or the nearest Leica equivalent) and read the code. Position 1 is the 12 o'clock notch, position 6 follows clockwise.
Legend: ⬜ = White (no color/metal) | ⬛ = Black (painted)
| Lens | Code | Display | Frame |
|---|---|---|---|
| Tri-Elmar-M 16-18-21mm f/4 | 010000 | ⬜⬛⬜⬜⬜⬜ | 28/90 |
| Super-Elmar-M 18mm f/3.8 | 110100 | ⬛⬛⬜⬛⬜⬜ | - |
| Summilux-M 21mm f/1.4 | 101111 | ⬛⬜⬛⬛⬛⬛ | 28/90 |
| Elmarit-M 21mm f/2.8 | 000001 | ⬜⬜⬜⬜⬜⬛ | 28/90 |
| Elmarit-M 21mm f/2.8 ASPH | 011000 | ⬜⬛⬛⬜⬜⬜ | 28/90 |
| Super-Elmar-M 21mm f/3.4 | 110011 | ⬛⬛⬜⬜⬛⬛ | 28/90 |
| Summilux-M 24mm f/1.4 | 110000 | ⬛⬛⬜⬜⬜⬜ | 24/35 |
| Elmarit-M 24mm f/2.8 ASPH | 011001 | ⬜⬛⬛⬜⬜⬛ | 24/35 |
| Elmar-M 24mm f/3.8 ASPH | 110010 | ⬛⬛⬜⬜⬛⬜ | 24/35 |
| Summilux-M 28mm f/1.4 ASPH | 110110 | ⬛⬛⬜⬛⬛⬜ | - |
| Summicron-M 28mm f/2 ASPH | 011010 | ⬜⬛⬛⬜⬛⬜ | 28/90 |
| Elmarit-M 28mm f/2.8 (III) | 000011 | ⬜⬜⬜⬜⬛⬛ | 28/90 |
| Elmarit-M 28mm f/2.8 (IV) | 011011 | ⬜⬛⬛⬜⬛⬛ | - |
| Elmarit-M 28mm f/2.8 ASPH | 011100 | ⬜⬛⬛⬛⬜⬜ | 28/90 |
| Summaron-M 28mm f/5.6 | 001011 | ⬜⬜⬛⬜⬛⬛ | 28/90 |
| Summilux-M 35mm f/1.4 Steel Rim | 001100 | ⬜⬜⬛⬛⬜⬜ | - |
| Summilux-M 35mm f/1.4 ASPH (FLE I/II) | 011101 | ⬜⬛⬛⬛⬜⬛ | 35/135 |
| Summicron-M 35mm f/2 (IV) | 000110 | ⬜⬜⬜⬛⬛⬜ | 35/135 |
| APO-Summicron-M 35mm f/2 ASPH | 001101 | ⬜⬜⬛⬛⬜⬛ | - |
| Summicron-M 35mm f/2 ASPH | 011110 | ⬜⬛⬛⬛⬛⬜ | 35/135 |
| Summarit-M 35mm f/2.4 | 010001 | ⬜⬛⬜⬜⬜⬛ | - |
| Summarit-M 35mm f/2.5 | 101011 | ⬛⬜⬛⬜⬛⬛ | 35/135 |
| Noctilux-M 50mm f/0.95 ASPH | 110001 | ⬛⬛⬜⬜⬜⬛ | 50/75 |
| Noctilux-M 50mm f/1 | 011111 | ⬜⬛⬛⬛⬛⬛ | 50/75 |
| Noctilux-M 50mm f/1.2 ASPH | 001110 | ⬜⬜⬛⬛⬛⬜ | - |
| Summilux-M 50mm f/1.4 (II) | 000101 | ⬜⬜⬜⬛⬜⬛ | 50/75 |
| Summilux-M 50mm f/1.4 ASPH | 100000 | ⬛⬜⬜⬜⬜⬜ | 50/75 |
| Summicron-M 50mm f/2 (III) | 010111 | ⬜⬛⬜⬛⬛⬛ | 50/75 |
| Summicron-M 50mm f/2 (IV/V) | 100001 | ⬛⬜⬜⬜⬜⬛ | 50/75 |
| APO-Summicron-M 50mm f/2 ASPH | 101001 | ⬛⬜⬛⬜⬜⬛ | 50/75 |
| Summarit-M 50mm f/2.4 | 010010 | ⬜⬛⬜⬜⬛⬜ | - |
| Summarit-M 50mm f/2.5 | 101100 | ⬛⬜⬛⬛⬜⬜ | 50/75 |
| Elmar-M 50mm f/2.8 | 100010 | ⬛⬜⬜⬜⬛⬜ | 50/75 |
| Noctilux-M 75mm f/1.25 | 111010 | ⬛⬛⬛⬜⬛⬜ | - |
| Summilux-M 75mm f/1.4 | 100011 | ⬛⬜⬜⬜⬛⬛ | 50/75 |
| APO-Summicron-M 75mm f/2 ASPH | 100100 | ⬛⬜⬜⬛⬜⬜ | 50/75 |
| Summarit-M 75mm f/2.4 | 010011 | ⬜⬛⬜⬜⬛⬛ | - |
| Summarit-M 75mm f/2.5 | 101101 | ⬛⬜⬛⬛⬜⬛ | 50/75 |
| Summilux-M 90mm f/1.5 | 111011 | ⬛⬛⬛⬜⬛⬛ | - |
| Summicron-M 90mm f/2 (II) | 000111 | ⬜⬜⬜⬛⬛⬛ | 28/90 |
| APO-Summicron-M 90mm f/2 ASPH | 100101 | ⬛⬜⬜⬛⬜⬛ | 28/90 |
| Thambar-M 90mm f/2.2 | 001100 | ⬜⬜⬛⬛⬜⬜ | - |
| Summarit-M 90mm f/2.4 | 010100 | ⬜⬛⬜⬛⬜⬜ | - |
| Summarit-M 90mm f/2.5 | 101110 | ⬛⬜⬛⬛⬛⬜ | 28/90 |
| Tele-Elmarit-M 90mm f/2.8 (II) | 000100 | ⬜⬜⬜⬛⬜⬜ | 28/90 |
| Elmarit-M 90mm f/2.8 | 100110 | ⬛⬜⬜⬛⬛⬜ | 28/90 |
| Macro-Elmar-M 90mm f/4 | 100111 | ⬛⬜⬜⬛⬛⬛ | 28/90 |
| Elmarit-M 135mm f/2.8 (I/II) | 001001 | ⬜⬜⬛⬜⬜⬛ | 28/90 |
| APO-Telyt-M 135mm f/3.4 | 110101 | ⬛⬛⬜⬛⬜⬛ | 35/135 |
| Macro Adapter M | 101000 | ⬛⬜⬛⬜⬜⬜ | - |
On your smartphone: scroll the table horizontally. The “Frame” column shows the bright frame overlay in the viewfinder — not relevant for the coding itself, but useful as a reference.
Video: 6-Bit Coding explained and demonstrated
Dr. Scott McDonald demonstrates coding with paper stencil and Sharpie — and explains what the camera does with it.
6. Common mistakes and practical tips
Mistake #1: Wrong pen
The most common reason why even coded lenses aren’t recognized. Standard felt-tip pens and markers are shiny — the reflected light fools the IR sensor. It reads “white” instead of “black.” The solution: a pen with matte, infrared-absorbing ink. The Edding 8400 (Aerospace Marker) is made for this — waterproof, lightfast, and above all: matte. That’s exactly why it’s included in our kit.
Mistake #2: Choosing the wrong code
If you code a Voigtländer 40mm f/1.2 as a Leica 50mm f/2, you get working EXIF data — but the vignetting correction won’t be optimal. Best practice: match focal length and maximum aperture as closely as possible. Coding a 40mm as a 35mm or 50mm is perfectly fine as long as the aperture values are similar.
Mistake #3: Forgetting to switch IBIS manually
Anyone working on the SL2/SL3 without coding and forgetting to change the focal length in the menu after switching lenses will systematically produce blurry images. The IBIS then compensates for the wrong focal length. This doesn’t happen with coding.
Mistake #4: Third-party adapter on the SL
Not every M-to-L adapter passes the 6-Bit code. Only the original Leica M-Adapter L (and some selected third-party ones like Novoflex with newer firmware) transmit the coding. K&F, TTArtisan, and many eBay adapters do not.
Hack: Code table for third-party lenses
Do you have a lens that doesn’t appear in any Leica list? Use the Leica model with the same focal length. If focal length is the same but aperture differs: lean toward the slower lens (e.g., code an f/1.2 as f/1.4). Vignetting correction for the slower glass is a bit stronger — better too much than too little.
Mistake #5: Applying code on film cameras
6-Bit coding has no effect on analog Leica M bodies (M6, M7, MP, M-A). These cameras have no sensor to read it. Applying it doesn’t harm but does nothing. Save yourself the effort.
Mistake #6: Not letting the paint dry properly
If you mount the lens on the camera immediately after coloring, you risk smudging the bayonet ring. 60 seconds drying time is enough. The Edding-8400 ink dries quickly but must fully set. Afterwards, it is smudge-proof.
Removing coding: How to do it
If you want to change or undo the code: apply isopropanol (IPA) to a cotton swab and wipe off the dots. The Edding-8400 ink dissolves without residue. Then you can apply a new code or use the lens uncoded.
Further resources
The community has gathered plenty of material. Here are the best sources:
- Macfilos: Third-Party Lenses on Steroids with 6-Bit Coding — Very detailed article with practical examples
- Moritz Recke: Adding 6-Bit Coding to Leica M Lenses — Step-by-step DIY guide
- Yukosteel: Leica M Lenses Auto Detection System — Technical deep dive into the sensor mechanism
- Rangefinderforum: 6-Bit Code List — Complete code table with community additions
Ready to get started?
Encoder kit with special pen — everything you need included. Fits every M-mount lens.
More guides?
Film scanner comparisons, camera repair tips, and analog photography practice.
Everything in one place
The complete Ausgeknipst range — from Leica accessories to film scanners.