BPC CE was constructed with a B-doped carbon layer onto the P-doped carbon. BPC CE was developed as efficient hole extractor for HTM-free perovskite solar cell. B and P co-doping tuned the work function and electrical conductivity of carbon CE. The TiO2/CH3NH3PbI3/BPC solar cell delivered a power conversion efficiency of 6.78%.