The test was broadcast on Twitter.
The Starship prototype rose to an altitude of about 10 km within a few minutes.
After takeoff, the vehicle made a smooth landing on the site located next to the launch complex.
“The Starship landing went according to plan,” wrote Tesla and SpaceX chief Elon Musk on Twitter.
In March, SpaceX's prototype Starship landed after a test flight and exploded minutes later.