J. William Ditter completed her shakedown off Bermuda in December. She sailed from Norfolk, Virginia 13 January 1945, and after transiting the Panama Canal and touching at San Diego, California arrived Pearl Harbor 10 February.
As the Navy's island-hopping thrust toward Japan reached its climax, Ditter sailed 2 March for Eniwetok and Ulithi, departing the latter base 19 March for Okinawa. She arrived 25 March off the critical island, soon to be the scene of the largest amphibious assault of the Pacific war, and began hazardous minesweeping operations. The next day she dodged a torpedo during an encounter with a Japanese submarine. On 29 March she discovered two suicide boats off Okinawa, and sank one of them with gunfire. By the day of the invasion, 1 April, Ditter and her sister mine-craft had swept the channels and laid marker buoys, contributing importantly to the success of the initial landing. Next day her duties shifted to convoy escort, as the versatile ship protected transports on night retirement away from Okinawa. On the night of 2 April the ship shot down two bombers, and she continued to come under air attack in the days that followed as the' Japanese made an effort to stop the invasion with kamikaze tactics.
J. William Ditter was assigned radar picket duty 12 April, and, subsequently, became the target of heavy air attack. She shot down several planes and assisted with several more until retiring to Kerama Retto 30 April. The ship was soon back on picket duty, however, and engaged in numerous battles with Japanese aircraft.
While patrolling with and 6 June, J. William Ditter was attacked by a large group of kamikazes. The ship's gun crews downed five of the planes; but a sixth glanced off her No. 2 stack; and another crashed into her on the port side near the main deck. The ship lost all power and suffered many casualties; but damage control kept her afloat until she could be towed by tug to Kerama Retto the next day. Eventually she was repaired enough to steam to Saipan on 10 July and begin the voyage home. She touched at San Diego and the Canal Zone before arriving New York 12 July 1945. J. William Ditter was decommissioned there on 28 September 1945 and was scrapped in July 1946.
J. William Ditter received one battle star for World War II service.
As of 2009, no other ship has been named J. William Ditter.