Visual imagery allows us to vividly imagine scenes in the absence of visual stimulation. The likeness of visual imagery to visual perception suggests that they might share neural mechanisms in the brain. Here, we directly investigated whether perception and visual imagery share cortical representations. Specifically, we used a combination of functional magnetic resonance imaging (fMRI) and multivariate pattern classification to assess whether imagery and perception encode the "category" of objects and their "location" in a similar fashion. Our results indicate that the fMRI response patterns for different categories of imagined objects can be used to predict the fMRI response patters for seen objects. Similarly, we found a shared representation of location in low-level and high-level ventral visual cortex. Thus, our results support the view that imagery and perception are based on similar neural representations.