The explosion was reported at 8:39 p.m. Monday in an underground parking garage of the apartment building, located in the 1400 block of Ocean Park Boulevard.
Police say the device was made up of a capped plastic milk jug with some kind of acid and aluminum foil inside.
No one was hurt and nothing was damaged.
Santa Monica police Sgt. Douglas Kohno said the device would have been dangerous if someone had been holding it when it went off.
"It's probably one step above a firecracker," he said.
Kohno also noted the device was likely made by a young prankster, and not by someone looking to cause serious damage or injury.
City News Service contributed to this report.