We realized a phase retrieval technique using terahertz (THz) radiation as an alternative to THz digital holography, named THz ptychography. Ptychography has been used in x-ray imaging as a groundbreaking improvement of conventional coherent diffraction imaging. Here we show that ptychography can be performed at THz frequencies too. We reconstructed an amplitude and a phase object with both simulated and real data. Lateral resolution accounts to <2λ, while depth variations as low as λ/30 can be assessed.