A pipe fastener for a hydraulic cylinder that: fixes a pipe supplying and discharging hydraulic fluid inside a cylinder tube to the cylinder tube; has a curved section along the outer circumference of the cylinder tube; and comprises two split bands that sandwich the cylinder tube by fixing both ends of the curved section to each other. One of the bands has an attachment section to which the pipe is attached and in which one section of the curved section is separated from the cylinder tube towards the outside in the radial direction.