Variational studies of the t-J model on the square lattice based on infinite projected-entangled pair states (iPEPS) confirm an extremely close competition between a uniform d-wave superconducting state and different stripe states. The site-centered stripe with an in-phase d-wave order has an equal or only slightly lower energy than the stripe with anti-phase d-wave order. The optimal stripe filling is not constant but increases with J/t. A nematic anisotropy reduces the pairing amplitude and the energies of stripe phases are lowered relative to the uniform state with increasing nematicity.