An optical beam profiler using a spatial light modulator and photodetector. In an embodiment, the spatial light modulator is a two-dimensional (2-D) small tilt digital micromirror device. The profiler features fast speed, digital controls, low polarization sensitivity, and high measurement repeatability. The 2-D multi-pixel device-based profiler allows the use of several beam profile measurement concepts including moving knife edge, scanning slit, moving pinhole, variable aperture, and 2-D photodiode array. The proposed digital optical beam profiler can be implemented with any type of digitally operated 2-D spatial light modulator device such as using liquid crystals, magneto-optics, multiple quantum wells, electro-optic polymers, and photonic crystals.