A two-dimensional Z-scan technique has been developed using a two-dimensional charge-coupled device (CCD) detector to study the nonlinear optical properties and beam profile evolution within optical limiting devices. Using the split step beam propagation method, the far field pattern at each Z position can be calculated precisely for any arbitrary beam shape and sample thickness. A two-dimensional far field pattern is recorded by the CCD detector, and the evolution of the beam distribution inside the nonlinear optical medium can be obtained directly. This technique has been applied to study the nonlinear optical parameters and laser beam profiles in nonlinear liquids. We have used thin and thick samples and Gaussian, top-hat and split Gaussian beam distributions, and the experimental results agreed very well with the calculation. This technique also offers a simple and accurate means for optimizing the design of optical limiting devices.