According to one embodiment, an electronic device includes a housing, an outer wall, a rib, a cable, and a stopper. The housing houses at least part of an electronic component. The outer wall constitutes at least part of an outer contour of the housing. The rib is located between the outer wall and the electronic component, and the outer surface of the rib faces the inner surface of the outer wall. The cable is routed between the outer wall and the rib. The stopper is housed in the housing, and engages the rib to prevent the rib from inclining toward the outer wall.