Microencapsulation of phase-change materials (PCMs) can prevent leakage of PCMs and enhance heat transfer with an increased surface area to volume ratio and thus benefit their pragmatic applications. However, the available methods have difficulties in microencapsulating PCMs with a tunable size, structure, and composition at will, thereby failing to accurately and flexibly tailor the thermal properties of microencapsulated PCMs (MEPCMs). Here, the microfluidic encapsulation of PCMs was presented for precisely fabricating MEPCMs with tunable thermal properties. The versatile fabrication of both organic and inorganic MEPCMs was demonstrated with high monodispersity, energy storage capacity, encapsulation efficiency, thermal stability, reliability, and heat charging and discharging rates. Notably, the inorganic MEPCMs exhibit an energy storage capacity of 269.3 J/g and a charging rate of 294.7 J/(g min), surpassing previously reported values. Owing to their high thermal performance, MEPCMs have been used for anticounterfeit applications. Droplet-based microfluidic fabrication opens up a new avenue for versatile fabrication of MEPCMs with well-tailored thermal properties, thus benefitting their applications.