Yes! It is safe to do squats after giving birth! The squat is a fundamental exercise that everyone does on a regular basis. However, you may need to modify the exercise immediately postpartum.
If you delivered via cesarean section, then you will need to wait longer. Everyone heals differently, and some women may need several weeks before attempting a squat.