A playpen comprising: an upper frame assembly including a corner joining part (114A, 114B, 114C, 114D); a standing leg (104A, 104B, 104C, 104D) pivotally connected with the corner joining part (114A, 114B, 114C, 114D), the standing leg (104A, 104B, 104C, 104D) being rotatable relative to the corner joining part (114A, 114B, 114C, 114D) between a folded position where the standing leg (104A, 104B, 104C, 104D) is folded toward the upper frame assembly and an unfolded position where the standing leg (104A, 104B, 104C, 104D) is deployed for providing standing support on a floor surface; and a locking mechanism (158, 258, 358, 458) disposed adjacent to the corner joining part (114A, 114B, 114C, 114D), the locking mechanism (158, 258, 358, 458) having a latch (160, 260, 360, 460) operable to lock the standing leg (104A, 104B, 104C, 104D) in the unfolded position and unlock the standing leg (104A, 104B, 104C, 104D) for rotation of the standing leg (104A, 104B, 104C, 104D) between the unfolded position and the folded position; wherein the upper frame assembly further includes a first and a second side frame portion (112A, 112B) opposite to each other, the first side frame portion including two first bars (120, 122) respectively connected pivotally with a first middle joining part at a middle of the first side frame portion, one of the two first bars (120, 122) being pivotally connected with the corner joining part (114A, 114C), and the second side frame portion including two second bars (132, 134) respectively connected pivotally with a second middle joining part at a middle of the second side frame portion; wherein the first and second middle joining parts (124, 136) are movable toward each other for folding the upper frame assembly and away from each other for unfolding the upper frame assembly. an upper frame assembly including a corner joining part (114A, 114B, 114C, 114D); a standing leg (104A, 104B, 104C, 104D) pivotally connected with the corner joining part (114A, 114B, 114C, 114D), the standing leg (104A, 104B, 104C, 104D) being rotatable relative to the corner joining part (114A, 114B, 114C, 114D) between a folded position where the standing leg (104A, 104B, 104C, 104D) is folded toward the upper frame assembly and an unfolded position where the standing leg (104A, 104B, 104C, 104D) is deployed for providing standing support on a floor surface; and a locking mechanism (158, 258, 358, 458) disposed adjacent to the corner joining part (114A, 114B, 114C, 114D), the locking mechanism (158, 258, 358, 458) having a latch (160, 260, 360, 460) operable to lock the standing leg (104A, 104B, 104C, 104D) in the unfolded position and unlock the standing leg (104A, 104B, 104C, 104D) for rotation of the standing leg (104A, 104B, 104C, 104D) between the unfolded position and the folded position; wherein the upper frame assembly further includes a first and a second side frame portion (112A, 112B) opposite to each other, the first side frame portion including two first bars (120, 122) respectively connected pivotally with a first middle joining part at a middle of the first side frame portion, one of the two first bars (120, 122) being pivotally connected with the corner joining part (114A, 114C), and the second side frame portion including two second bars (132, 134) respectively connected pivotally with a second middle joining part at a middle of the second side frame portion; wherein the first and second middle joining parts (124, 136) are movable toward each other for folding the upper frame assembly and away from each other for unfolding the upper frame assembly.