John W. Hyde, 87, a retired palnning engineer for the Naval Gun Factory here and a Washington resident for more than 50 years, died of a lung ailment Friday at Loch Raven Veterans Administration Hospital in Baltimore.

Born in Annapolis, Mr. Hyde came to Washington as a youth. He worked as an apprentice at the Navy Yard for a time before returning to Annapolis to attend St. John's College there. Before graduating from college, he enlisted in the Maryland National Guard. He served in the Mexican border campaign prior to World War I and with the American Expeditionary Force's 197th Infantry Brigade in France in World War I.

After the war, he returned to Washington and rejoined the Naval Gun Factory, from which he retired in 1956 after 37 years of service.

Mr. Hyde was a member of St. John's Masonic Lodge No. 11 here and the Naval Masonic Lodge No. 4. He was a past commander of the local chapter of the Veterans of Foreign Wars.

Survivors include his wife, Irene, of Washington; a son, retired Army Col. Radford D. Hyde of Omaha, Neb., and four grandchildren.

The family suggests that expressions of sympathy be in the form of contributions in his name to the Metropolitan Memorial United Methodist Church here.