Channel code is a key technique in satellite communications to improve reliability of lines of communication. The class of Low Density Parity Check(LDPC) codes is recommended by Consultative Committee for Space Data Systems(CCSDS) for application in deep space communication. To meet different requirements of varied space communication channels,a universal encoder that implements all codes in CCSDS is designed. It can save hardware resources and improve intersatellite availability for transplanting. Using VHDL language,the encoder is implemented on FPGA with less resources. The simulation results have verified the correction of the encoder.