In this Letter, we present a digital micromirror device (DMD)-based ultrafast beam shaper, i.e., DUBS. To our knowledge, the DUBS is the first binary laser beam shaper that can generate high-resolution (1140×912 pixels) arbitrary beam modes for femtosecond lasers at a rate of 4.2 kHz; the resolution and pattern rate are limited by the DMD. In the DUBS, the spectrum of the input pulsed laser is first angularly dispersed by a transmission grating and subsequently imaged to a DMD with beam modulation patterns; the transmission grating and a high-reflectivity mirror together compensate the angular dispersion introduced by the DMD. The mode of the output beam is monitored by a CCD camera. In the experiments, the DUBS is programmed to generate four different beam modes, including an Airy beam, Bessel beam, Laguerre-Gaussian (LG) beam, and a custom-designed "peace-dove" beam via the principle of binary holography. To verify the high shaping rate, the Airy beam and LG beam are generated alternately at 4.2 kHz, i.e., the maximum pattern rate of our DMD. The overall efficiency of the DUBS is measured to be 4.7%. With the high-speed and high-resolution beam-shaping capability, the DUBS may find important applications in nonlinear microscopy, optical manipulation, and microscale/nanoscale laser machining, etc.