While your 40V batteries won’t fit in the smaller 18V charger, there is a way to make your LXT (18V) batteries compatible with an XGT (40V) charger. Even though the 18V is smaller, it doesn’t just slide onto the 40V port, so you’ll need to have an adapter. To make the two lines compatible, Makita released the 18V LXT Adapter for XGT Chargers. The adapter slips easily onto any 40V XGT charger and features a connection for an 18V battery.
You may worry about damaging the 18V battery on a higher voltage charger. After all, doing so in any other scenario can ultimately diminish the performance and lifespan of the battery. However, Makita’s adapter features the necessary failsafe protection to keep the 40V charger from negatively impacting the 18V battery. Among its features is overload, over-discharge, and overheating protection. Overload protection, specifically, is what makes it possible to charge any size 18V LXT battery, from the 2.0Ah Compact Lithium-Ion to the 6.0Ah Lithium-Ion, on the higher-voltage charger.
This doesn’t mean you can take the Makita adapter and put it on your 40V tools, though. It’s designed specifically for the charging base for 40V batteries, and can’t be used to put 18V batteries in 40V tools. As YouTuber Tools & Stuff demonstrates, the adapter is configured slightly differently than the batteries themselves, with a slightly altered mold than what’s on the battery connection of the tools. You’ll need to stick to the right voltage for each power tool.