William J. Foley (March 2, 1887–December 1, 1952) was an American attorney and politician who served as District Attorney of Suffolk County, Massachusetts from 1927 until his death 1952.