"This action is taken only due to the extraordinarily difficult challenges ahead and would not otherwise be necessary," the company said in a statement.
The layoffs were announced to workers in an email from President Gwynne Shotwell, the Los Angeles Times reported.
The email said laid-off employees will be offered at least eight weeks' pay and other benefits, along with help with finding new jobs, the Times said.
Elon Musk's company is financially healthy and was recently valued at nearly $30 billion. It has a lucrative business sending government and commercial satellites into orbit, including a launch from California on Friday, and delivering supplies to the International Space Station.
But the company has several expensive projects in the works. Musk has estimated it will cost up to $10 billion to develop a spaceship that could send humans to Mars. This week he unveiled a steel-clad test flight prototype of the rocket, which he calls Starship.
Another $10 billion project called Starlink would create a constellation of satellites to provide affordable broadband internet service.
This year, the company plans to begin Starship test flights and to launch the first Starlink satellites.
"To continue delivering for our customers and to succeed in developing interplanetary spacecraft and a global space-based Internet, SpaceX must become a leaner company," the company statement said. "Either of these developments, even when attempted separately, have bankrupted other organizations."
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.