A safety gate has a first post assembly, a spinning mechanism, a cover body, and a positioning mechanism. The spinning mechanism is rotatably mounted in the first post assembly. The cover body has an edge mounted in the spinning mechanism. The gate body is wound around and is pulled out from the spinning mechanism to spin the spinning mechanism. The positioning mechanism has a knob and a positioning mount. The positioning mount is moved upwardly or downwardly relative to the spinning mechanism to selectively disengage from and engage with the spinning mechanism. The spinning mechanism is prevented from spinning while being engaged with the positioning mount.