Cats are drawn to rectangles because their brains are wired to detect edges and boundaries, and enclosed or outlined shapes trigger a cluster of deeply rooted instincts around safety, warmth, and concealment. That cardboard box on your floor, the rectangle of tape you saw in a viral video, or even the outline of a laptop all tap into the same behavioral pattern: if a cat perceives a defined boundary, it wants to be inside it.
How Cats See Edges and Boundaries
The explanation starts with how cat brains process visual information. Pioneering neuroscience experiments using cats as subjects revealed that neurons in the visual cortex are specifically tuned to line orientations. Individual brain cells fire selectively in response to vertical, horizontal, or angled edges. This means cats are exceptionally good at detecting the outlines of shapes, even simple ones like a square taped on the floor.
This edge-detection system is so sensitive that cats respond to boundaries that aren’t even physically there. A 2021 citizen science study tested whether cats would sit inside a Kanizsa square, an optical illusion that creates the impression of a square’s edges using only four strategically placed shapes at the corners. Over 500 cat owners participated, and cats chose to sit inside the illusory square just as often as they sat inside a real taped square, and significantly more often than a control shape that didn’t suggest any boundary. In other words, cats treat a perceived rectangle the same way they treat a real one. Their visual system fills in the gaps and says “that’s an enclosure.”
Enclosed Spaces Mean Safety
Cats are both predators and prey in the wild, and that dual identity shapes nearly everything about their behavior indoors. Hiding inside an enclosed space serves two purposes at once: it conceals a cat from larger predators, and it provides a vantage point for ambushing smaller prey. A rectangle, whether it’s a box, a suitcase, or a laundry basket, offers walls on multiple sides. Even a two-dimensional rectangle (like tape on the floor) may activate the same instinct at a basic perceptual level, because the cat’s brain registers “boundary” and begins associating it with shelter.
This isn’t just theory. A controlled trial at a Dutch animal shelter gave some newly arrived cats a hiding box and left others without one. Cats with hiding boxes showed significantly lower stress levels, reaching a calm baseline a full seven days earlier than cats without boxes. The biggest difference appeared on day two, when the box group was already measurably less stressed. For cats in unfamiliar or overwhelming environments, an enclosed rectangular space isn’t a quirky preference. It’s a coping mechanism.
Rectangles Help Cats Stay Warm
Cats run hotter than most people realize. Their thermoneutral zone, the temperature range where their body doesn’t need to spend extra energy heating or cooling itself, falls between 86 and 101 degrees Fahrenheit. For comparison, dogs are comfortable starting around 68 degrees. Most homes sit well below a cat’s comfort zone, which is why your cat gravitates toward sunny windowsills, laptop keyboards, and small enclosed spaces.
A box or any snug rectangular enclosure traps body heat. The smaller the space relative to the cat’s body, the more efficiently it retains warmth. This is why cats often choose boxes that seem absurdly small. They’re not being funny (though they are). They’re choosing the tightest fit because it keeps them warmest. A rectangle of tape on the floor won’t provide any actual insulation, but the visual boundary may still trigger the impulse to curl up in what the cat’s brain reads as a potential shelter.
Why Rectangles Specifically
Cats don’t exclusively prefer rectangles over circles or other shapes. The key factor is a clearly defined boundary. Rectangles just happen to be everywhere in human homes: boxes, books, placemats, laptops, sheets of paper, trays, sinks. The shape is incidental. What matters is that the outline is distinct enough for the cat’s edge-detecting visual system to register it as an enclosed area.
That said, rectangular boxes do have a practical advantage over round containers. They provide corners where a cat can press its back against two walls simultaneously, maximizing the feeling of being enclosed and protected. Corners also reduce the angles from which a potential threat could approach. A round bed is comforting, but a rectangular box with high sides hits more of a cat’s security checkboxes at once.
Using This Knowledge at Home
Understanding this behavior gives you a simple, almost free way to improve your cat’s quality of life. Leave out open cardboard boxes, plastic storage containers, or even paper bags (with handles removed) in quiet areas of your home. Veterinary behaviorists recommend creating what they call “safe havens,” small refuges in separate, low-traffic spaces where a cat can retreat when stressed. A large open box in a calm corner of a room serves this purpose perfectly.
Placement matters more than the box itself. Cats prefer spots where they can see approaching activity without being in the middle of it. A box tucked beside a bookshelf or under a desk in a quiet room will get more use than one placed in a busy hallway. If you have multiple cats, each one benefits from having its own retreat space, since sharing a single box can create competition rather than comfort.
You can also use this instinct during stressful transitions. Moving to a new home, introducing a new pet, or recovering from a vet visit are all situations where providing a few extra boxes or enclosed spaces can measurably reduce your cat’s stress and help them adjust faster, just as the shelter study demonstrated with newly arrived cats.

