Compressed sensing aims to recover the sparse signal from small linear random combination. The recovery process of the sparse signal through an underdetermined system is the most challenging part of the compressed sensing area. Recently, there are many algorithms have been developed for the recovery process to solve the optimization problem such as hard thresholding, greedy and convex optimization algorithms. In this paper, modifications of hard thresholding algorithms are proposed. An iterative algorithm is introduced which is called Forward and Backward Hard Thresholding algorithm (FBHT). It depends on two stages. One expands the support size and the other removes some elements from it with the guarantee of expanding the support size after each iteration. The forward and the backward steps are continued until reaching of the minimum value of residual by using a certain threshold. Many simulation programs are executed to compare the performance of the proposed FBHT algorithm with the related previous ones. The FBHT algorithm outperforms the previous ones in chosen performance metrics which are the mean square error and the signal to error ratio. Furthermore, the impact of some related parameters of the proposed FBHT algorithm and the impact of the sparsity level is discussed.