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...