PROBLEM TO BE SOLVED: To provide a shape sensor which is difficult to be affected by torsion or the like and is capable of measuring a bending shape only in a desired bending direction.SOLUTION: The shape sensor comprises a shape sensor body 4 which includes a light source 5, an optical fiber 2 capable of transmitting desired detection light emitted from the light source 5, a detection object part 6 arranged in a part of the optical fiber 2, and a light reception part 7 for detecting the detection light transmitted through the optical fiber 2 and is capable of measuring a shape of a measurement object by utilizing the fact that, when the optical fiber 2 is bent, characteristics of the light detected through the detection object part 6 are varied in accordance with the change in curvature of the optical fiber 2. A bending direction regulation part 3 which regulates a bendable direction of the optical fiber 2 to a desired direction is provided at least partially in an optical axis direction of the optical fiber 2, and the bending direction regulation part 3 is a core member 15 which is installed in at least a part of the shape sensor body 4 in a light transmission direction of the optical fiber 2 and has a main bending direction regulated.【課題】本発明は、ねじれ等の影響を受け難い、所望の湾曲方向のみの湾曲形状を測定可能な形状センサを提供することである。【解決手段】光源5と、光源5から照射される所望の検出光を伝搬可能な光ファイバ2と、光ファイバ2の一部に配置された被検出部6と、光ファイバ2を通して伝搬された検出光を検出する受光部7とを有し、光ファイバ2の湾曲時に、光ファイバ2の曲率の変化に応じて、被検出部6を経て検出される光の特性が変化することを利用して被測定物の形状を測定可能な形状センサ本体4を有し、光ファイバ2の光軸方向に沿って少なくとも1部に光ファイバ2の湾曲可能方向を所望の方向に規制する湾曲方向規制部3を備え、湾曲方向規制部3は、形状センサ本体4の少なくとも1部に光ファイバ2の光伝搬方向に沿って設置され、主な湾曲方向が規制されている芯部材15である。【選択図】図1