A key duplicating machine, comprising: a base, a main axis processing device, a detecting device, a feeding device, a clamping device and a drive device, wherein the base comprises a vertical plate and a horizontal plate and the vertical plate and the horizontal plate intersect, wherein the vertical plate separates the horizontal plate into a front part and a rear part, and the vertical plate has a through hole, wherein the feeding device is flexibly connected to the horizontal plate and crosses the horizontal plate via the through hole, wherein the clamping device is rigidly connected to the feeding device and arranged in the front part, characterised in that: - the main axis processing device and the detecting device are both flexibly connected to the vertical plate and arranged on the side facing the front part, in that - driven by the drive device, the feeding device is used to take the key on the clamping device to the processing position of the main axis processing device and the detecting position of the detecting device, in that - the detecting device is used to detect and calibrate the precise position of the clamping device or the precise position of the key on the clamping device, and in that - the main axis processing device is used to duplicate and process the key based on the calibration and detection result of the detecting device. a base, a main axis processing device, a detecting device, a feeding device, a clamping device and a drive device, wherein the base comprises a vertical plate and a horizontal plate and the vertical plate and the horizontal plate intersect, wherein the vertical plate separates the horizontal plate into a front part and a rear part, and the vertical plate has a through hole, wherein the feeding device is flexibly connected to the horizontal plate and crosses the horizontal plate via the through hole, wherein the clamping device is rigidly connected to the feeding device and arranged in the front part, characterised in that: - the main axis processing device and the detecting device are both flexibly connected to the vertical plate and arranged on the side facing the front part, in that - driven by the drive device, the feeding device is used to take the key on the clamping device to the processing position of the main axis processing device and the detecting position of the detecting device, in that - the detecting device is used to detect and calibrate the precise position of the clamping device or the precise position of the key on the clamping device, and in that - the main axis processing device is used to duplicate and process the key based on the calibration and detection result of the detecting device. - the main axis processing device and the detecting device are both flexibly connected to the vertical plate and arranged on the side facing the front part, in that - driven by the drive device, the feeding device is used to take the key on the clamping device to the processing position of the main axis processing device and the detecting position of the detecting device, in that - the detecting device is used to detect and calibrate the precise position of the clamping device or the precise position of the key on the clamping device, and in that - the main axis processing device is used to duplicate and process the key based on the calibration and detection result of the detecting device.