In the 12-GeV synchrotron of the KEK PS, beam losses during the injection flat bottom and at the transition energy were serious and final obstacles to beam intensity upgrade for the long-baseline neutrino-oscillation experiment. To supplement existing schemes to cope with the losses, an additional method was proposed: bunch shaping by modulating acceleration rf voltage with a band-limited white signal. A unique feature of this method is to increase the bunching factor without the longitudinal emittance blowup, in principle. The temporal evolution of the beam distribution and the time constant was evaluated through computer simulations and analytic considerations. This method has been successfully applied to the KEK-PS. The system of bunch shaping has been working very stably more than a year and keeps the beam intensity more than 7×10 12 protons per pulse at the top energy.