We present a novel method for local image feature matching. Instead ofperforming image feature detection, description, and matching sequentially, wepropose to first establish pixel-wise dense matches at a coarse level and laterrefine the good matches at a fine level. In contrast to dense methods that usea cost volume to search correspondences, we use self and cross attention layersin Transformer to obtain feature descriptors that are conditioned on bothimages. The global receptive field provided by Transformer enables our methodto produce dense matches in low-texture areas, where feature detectors usuallystruggle to produce repeatable interest points. The experiments on indoor andoutdoor datasets show that LoFTR outperforms state-of-the-art methods by alarge margin. LoFTR also ranks first on two public benchmarks of visuallocalization among the published methods.