Two-dimensional (2D) hybrid organic-inorganic perovskites (HOIPs) have aroused great interests in various optoelectronic fields. Here, the highly stable 2D (C 6 H 5 C 2 H 4 NH 3 ) 2 PbI 4 nanocrystals (PEA 2 PbI 4 NCs) have been prepared successfully via liquid-phase exfoliation (LPE) method, and the ultrafast nonlinear saturable absorption characteristics have been studied within the spectral range from near-infrared to mid-infrared regime. Based on the unique nonlinear optical response of the 2D HOIPs, a highly stable fiber laser with pulse duration ∼ 531 fs and signal-to-noise ratio (SNR) ∼ 90 dB have been delivered from a mode-locked Er 3+ -doped fiber laser (EDFL) around 1.5 μm, and a robust nanosecond fiber laser with pulse duration ∼ 553 ns and SNR ∼ 40 dB has been obtained from a Q-switched Er 3+ -doped fluoride fiber laser (EDFFL) around 2.8 μm experimentally. Our experimental results demonstrate the potential of 2D perovskites as broadband pulse modulators and may pave the way for advanced broadband optoelectronic applications based on 2D HOIPs.