A hydraulic device comprising: a tool unit having a hydraulic pump for generating pressure oil by rotation of a rotary member , a first rotary shaft connected to the rotary member , and a tool that operates by the pressure oil generated by the hydraulic pump ; and a driving unit having a motor for driving rotation of the rotary member of the hydraulic pump , and a second rotary shaft rotated by the motor , the driving unit being detachably mounted to the tool unit ; wherein a connected portion is disposed at an end of one of the first rotary shaft of the tool unit and the second rotary shaft of the driving unit , and a connecting portion which is connected to the connected portion is disposed at an end of the other thereof; characterized in that : the connected portion has a guide shaft that rotates integrally with the first rotary shaft or the second rotary shaft , and a plurality of engaged portions disposed around the guide shaft , and the connecting portion has a guide hole into which the guide shaft is inserted, and engaging portions with which the engaged portions are engaged and which are disposed around the guide hole ; wherein the engaged portions are projections , and the engaging portions are recesses into which the projections fit, wherein a tip of each projection is tilted relative to a longitudinal direction of the guide shaft , and is tilted relative to a surface orthogonal to the longitudinal direction of the guide shaft , and wherein a projection is disposed between the recesses , and a tip of the projection is tilted relative to a longitudinal direction of the guide hole , and is tilted relative to a surface orthogonal to the longitudinal direction of the guide hole . a tool unit having a hydraulic pump for generating pressure oil by rotation of a rotary member , a first rotary shaft connected to the rotary member , and a tool that operates by the pressure oil generated by the hydraulic pump ; and a driving unit having a motor for driving rotation of the rotary member of the hydraulic pump , and a second rotary shaft rotated by the motor , the driving unit being detachably mounted to the tool unit ; wherein a connected portion is disposed at an end of one of the first rotary shaft of the tool unit and the second rotary shaft of the driving unit , and a connecting portion which is connected to the connected portion is disposed at an end of the other thereof; the connected portion has a guide shaft that rotates integrally with the first rotary shaft or the second rotary shaft , and a plurality of engaged portions disposed around the guide shaft , and the connecting portion has a guide hole into which the guide shaft is inserted, and engaging portions with which the engaged portions are engaged and which are disposed around the guide hole ; wherein the engaged portions are projections , and the engaging portions are recesses into which the projections fit, wherein a tip of each projection is tilted relative to a longitudinal direction of the guide shaft , and is tilted relative to a surface orthogonal to the longitudinal direction of the guide shaft , and wherein a projection is disposed between the recesses , and a tip of the projection is tilted relative to a longitudinal direction of the guide hole , and is tilted relative to a surface orthogonal to the longitudinal direction of the guide hole . <EOS>