Vision provides crucial signals to guide navigation, and guiding navigation is one of vision’s main functions. The transformation of visual signals into estimates of position, however, is not understood. To study this transformation we recorded from large populations of neurons in the cortex of mice that navigated in environments in virtual reality. Contrary to textbook expectations, we found that neurons as early as primary visual cortex exhibit preferences for spatial position. These preferences strengthen as signals proceed towards parietal cortex, where responses become entirely related to navigation, coding for combinations of the animal’s position and heading direction. Navigation signals in visual cortex correlate strongly with signals in hippocampus, where cells have well-known preferences for spatial position, and are closely related to the animal’s subjective estimate of location. Signals related to navigation, therefore, appear remarkably early in the visual system, and are intimately related to the animal’s own estimate of position in the world.