A compact all fiber Q-switched fiber laser based on an Er/Yb co-doped fiber (EYDF) is demonstrated. Two Bragg gratings (FBG1 and FBG2) were employed as the cavity mirrors. The Average output power, single pulse energy and pulse width of the fiber laser at different pumping powers and different repetition rates was studied. The output
spectrum of the fiber laser is 0.5 nm. At maximum launched pump power of 558mW, pulse energy of about 50μJ and duration of 140ns was obtained at the repetition of 2 kHz.