In this study, urea–formaldehyde based microcapsules containing linseed oil were prepared via in situ polymerization method. Microcapsules with a regular spherical shape, 10–300μm diameter and an oil content of 63–77wt% were synthesized in various core:shell ratios and different mixing speeds. The effect of core:shell ratio and mixing speed on the size and morphology of the microcapsule were studied using optical microscopy, SEM and particle size analysis. Epoxy-based coatings containing various amounts of microcapsules were prepared and the effect of microcapsule size and loading on the mechanical properties and healing performance were evaluated by measuring the tensile properties and corrosion performance of the coatings. The amount of the oil released in the scratched coating was determined both practically and theoretically and the results were compared.The results showed that the addition of microcapsules reduces the tensile properties of the coating, the extent of which depends on the microcapsule size and loading wt%. For instance, sample containing 3wt% of the microcapsules with an average particle size of 53μm showed 8.6% reduction in tensile modulus. Optical microscopy of the scratched sample revealed that with increasing microcapsules’ size and loading, the crack was filled more effectively and this led to an improved corrosion performance. Finally, the optimum combination of self-healing and mechanical properties was found to be for the coating containing 5wt% of microcapsules, with an average particle size of 53μm.