WASHINGTON—A unanimous Supreme Court ruled Wednesday that police must obtain a warrant to search the vast amount of information on a suspect's cellphone, broadly protecting Americans' privacy rights in the digital age.

The opinion, by Chief Justice John Roberts, dismissed law-enforcement arguments that no legal distinction existed between smartphones and the pocket litter that police long have been permitted to search when arresting a suspect—for instance, wallets, cigarette wrappers and address books.

"That is like saying a ride on horseback is materially indistinguishable from a flight to the moon," Chief Justice Roberts wrote. "Modern cell phones, as a category, implicate privacy concerns far beyond those implicated by the search of a cigarette pack, a wallet or a purse," he wrote.

Warrantless searches have been justified by the need to protect officers from hidden weapons and to prevent suspects from destroying evidence. Neither rationale applied to the digital data accessible through a cellphone or other mobile devices, the court found, in erecting a requirement that police go to court before rifling through email, text messages, phone records or other data.

The chief justice acknowledged that mobile devices are essential tools for today's criminals, as they are for most Americans, and that requiring police to seek a magistrate's permission to search them could impede some investigations.