Abstract In photoacoustic imaging (PAI), reconstruction from sparse-view sampling data is a remaining challenge in the cases of fast or real-time imaging. In this paper, we present our study on a total variation based gradient descent (TV-GD) algorithm for sparse-view PAI reconstruction. This algorithm involves the total variation (TV) method in compressed sensing (CS) theory. The objective function of the algorithm is modified by adding the TV value of the reconstructed image. With this modification, the reconstructed image could be closer to the real optical energy distribution map. Additionally in the proposed algorithm, the photoacoustic data is processed and the image is updated individually at each detection point. In this way, the calculation with large matrix can be avoided and a more frequent image update can be obtained. Through the numerical simulations, the proposed algorithm is verified and compared with other reconstruction algorithms which have been widely used in PAI. The peak signal-to-noise ratio (PSNR) of the image reconstructed by this algorithm is higher than those by the other algorithms. Additionally, the convergence of the algorithm, the robustness to noise and the tunable parameter are further discussed. The TV-based algorithm is also implemented in the in vitro experiment. The better performance of the proposed method is revealed in the experiments results. From the results, it is seen that the TV-GD algorithm may be a practical and efficient algorithm for sparse-view PAI reconstruction.