A variable stiffness device includes a first elongated member including high-bending stiffness portions and a low-bending stiffness portion between adjacent high-bending stiffness portions, a second elongated member arranged along the first elongated member and including shape-memory members and a connecting member between adjacent shape-memory members, a heater to heat a shape-memory member in the low-bending stiffness portion to increase the bending stiffness, and a moving mechanism to move the second elongated member relative to the first elongated member. When the heater heats a first shape-memory member in the low-bending stiffness portion, a second shape-memory member next to the first shape-memory member is arranged in a high-bending stiffness portion.