John S. Hayes, 71, a retired official of The Washington Post Co. who was ambassador to Switzerland from 1966 to 1969, died yesterday of congestive heart failure in a hospital in Jacksonville, Fla. He lived in Ponte Vedra Beach, Fla.

Mr. Hayes worked for The Post for nearly 20 years before he retired in 1966 as president of Post-Newsweek Stations and as executive vice president and member of the board of directors of The Washington Post Co.

At the time he left The Post, the company broadcast properties consisted of WTOP-TV and WTOP-AM-FM radio in Washington, and WJXT-TV in Jacksonville. Katharine Graham, the company's board chairman, praised Mr. Hayes on his retirement for his role in development of the broadcasting section of the company.

"Under his leadership, the stations have developed into some of the most distinguished in the country -- especially notable for their editorial leadership and news coverage," she said.

During his years with The Post, Mr. Hayes was a board member of the National Association of Broadcasters, and in 1964 served as chairman of the association's committee on international broadcasting. In 1965, he was named to the Carnegie Corp.'s commission on educational television.

In addition to his post as ambassador, he was a member of the U.S. delegation to the International Conference on Satellite Communications in 1969, and had been chairman of Radio Free Europe/Radio Liberty since 1976.

He was active in charitable fund-raising organizations for many years. He led Community Chest campaigns in Washington in 1954 and 1955, and a year later became a founder and vice president of the United Givers Fund of the Greater National Capital Area.

From 1962 to 1964, he was president of the United Community Funds and Councils of America. In that post he headed an association serving 2,200 United Funds, Community Chests and Community Welfare Councils in North America.

He was chairman of Meridian House International in Washington from 1970 to 1974, and had been a member of the boards of the National Urban League, the USO, the National Symphony Orchestra, the Washington Performing Arts Society and Arena Stage.

Mr. Hayes was a native of Philadelphia and a 1931 graduate of the University of Pennsylvania. During World War II, he was European Theater commander of the American Forces Network, and served on Gen. Dwight D. Eisenhower's staff. Mr. Hayes left the Army with the rank of lieutenant colonel. His decorations included the Bronze Star, the French Croix de Guerre and the Order of the British Empire.

After the war, he was station manager of the New York Times' radio station WQXR, then came to Washington and joined The Post as executive vice president of radio station WINX, its first broadcast venture.

His marriage to Evelyn Hayes ended in divorce.

Mr. Hayes' survivors include his wife, the former Donna Gough, of Ponte Vedra Beach; four children, Jonathan S., of Westport, Conn.; Rhea Ann Brooks, of Haverford, Pa.; Laurie Amilcare of Philadelphia, and Peter, of Ponte Vedra Beach, and four grandchildren.