A hinge device includes a first connecting member and a second connecting member pivotably connected to the first connecting member by an axle. A rotary member and a limiting member are mounted in the axle. The rotary member includes a at least one positioning groove. The limiting member includes at least one positioning leg. The rotary member is actuatable by the first connecting member to pivot about the axle. The limiting member is fixed on the axle. The limiting member is located between the rotary member and a retaining device biasing the limiting member toward the rotary member. When the first connecting member pivots through an angle relative to the second connecting member, the at least one positioning leg engages with the at least one positioning groove, thereby positioning the first connecting member relative to the second connecting member.