How different visual systems process images and make perceptual errors can inform us about cognitive and visual processes. One of the strongest geometric errors in perception is a misperception of size depending on the size of surrounding objects, known as the Ebbinghaus or Titchener illusion. The ability to perceive the Ebbinghaus illusion appears to vary dramatically among vertebrate species, and even populations, but this may depend on whether the viewing distance is restricted. We tested whether honeybees perceive contextual size illusions, and whether errors in perception of size differed under restricted and unrestricted viewing conditions. When the viewing distance was unrestricted, there was an effect of context on size perception and thus, similar to humans, honeybees perceived contrast size illusions. However, when the viewing distance was restricted, bees were able to judge absolute size accurately and did not succumb to visual illusions, despite differing contextual information. Our results show that accurate size perception depends on viewing conditions, and thus may explain the wide variation in previously reported findings across species. These results provide insight into the evolution of visual mechanisms across vertebrate and invertebrate taxa, and suggest convergent evolution of a visual processing solution.