The article is devoted to an algorithm for increasing the density of placements in orthogonal packing problems. The proposed heuristic compaction algorithm is based on the principle of local replacement of placed objects located as far from the origin of a container as well as objects located near the local free spaces inside it. Six rules for selecting objects for replacement of them in a container with the aim to obtain a placement with a better density are proposed. The article contains results of computational experiment carried out on the standard strip packing problems.