SAN FRANCISCO — Social-media giant Pinterest Inc. can’t block a startup travel planning site from using the similar-sounding name Pintrips, a federal judge ruled Wednesday.

U.S. District Judge Haywood Gilliam Jr. sided with Pintrips Inc. and its lawyers at Kenyon & Kenyon in the companies’ trademark spat, finding that Pintrips came up with its name independently and that its use of the term “pin” falls in line with its long-time use in the computer lexicon.