We have developed and improved an ultracold neutron (UCN) decelerator named "UCN rebuncher." The rebuncher can give continuously changing deceleration to pulsed polarized UCNs by the combination of an adiabatic fast passage spin flipper, a frequency sweeping resonator, and a gradient magnetic field. By using this apparatus, we can control the longitudinal velocity of UCNs and time-focus UCNs on an arbitrary point. In a neutron electric dipole moment measurement at a spallation pulsed superthermal UCN source with a solid deuterium converter, the apparatus makes it possible to recover the spatial density of diffusing pulsed UCNs and store them in a cell efficiently. We carried out the UCN focus experiment with the improved rebuncher at BL05 (NOP) in J-PARC/MLF. We succeeded in decelerating 5.5-m/s UCNs, focusing them on the detection timing of 4.8-m/s UCNs, and confirming an obvious peak in the time-of-flight spectrum. The count rate at the peak was 2.2 times higher than without the rebuncher.