A variable stiffness device includes a first elongated member in a hollow shape extending along a longitudinal axis, and a second elongated member including a heater, disposed inside an inner circumference of the first elongated member, and extending in parallel to the first elongated member along the longitudinal axis. The first elongated member includes a high bending stiffness portion and a low bending stiffness portion alternately aligned along the longitudinal axis. One of the first elongated member and the second elongated member includes a shape-memory pipe. The heater extends through an inner space of the shape-memory pipe and configured to heat the shape-memory pipe to increase stiffness of the shape-memory pipe.