In this work, we propose a novel local mesh refinement algorithm based on the use of transformation optics (TO). The new algorithm is an alternative way to achieve local mesh refinement. It applies transformation optics to enlarge a small region and then we numerically solve the new anisotropic Maxwell's equations in the transformed space by an anisotropic FDTD method. In comparison to the subgridding and AMR methods, one of the major advantages of our method is the proven stability property of the numerical methods applied to the anisotropic Maxwell equations. Our method does not have coarse-fine mesh interfaces, so that other error such as dispersion error due to the coarse-fine mesh interface is avoided. The TO method is a natural stable, efficient and robust alternative to traditional subgridding methods that suffer from late-time instabilities.