Huan Yanfan (桓彥範) (653–706), courtesy name Shize (士則), formally Prince Zhonglie of Fuyang (扶陽忠烈王), briefly known during the reign of Emperor Zhongzong of Tang as Wei Yanfan (韋彥範), was an official of the Chinese dynasty Tang Dynasty and Wu Zetian's Zhou Dynasty, serving as chancellor during the reign of Emperor Zhongzong. He was a key figure in the coup that overthrew Wu Zetian and restored Emperor Zhongzong in 705, but was later exiled due to false accusations instigated by Wu Zetian's nephew Wu Sansi and killed in exile in a cruel manner.
Huan Yanfan was born in 653. His family was from Run Prefecture (潤州, roughly modern Zhenjiang, Jiangsu) and traced its ancestry to the Jin Dynasty (265-420) general Huan Chong. His grandfather Huan Fasi (桓法嗣) and father Huan Simin (桓思敏) both served as officials during Tang Dynasty, and on account of this heritage, Huan Yanfan was made an officer of the imperial guards when he was young. It was said that he was generous and expressive.
Early in the Shengli era (697-700) -- when the ruling sovereign was Wu Zetian, the wife of Emperor Gaozong, who had seized the throne in 690 and taken the title of "emperor" of a new Zhou Dynasty, interrupting Tang—Huan Yanfan became Sixingsi Zhubu (司刑寺主簿), the secretary general at the supreme court (司刑寺, Sixingsi). The chancellor Di Renjie was impressed by his talent and showed him respect. Huan was eventually made an imperial censor.
In 704, Huan was made the assistant chief judge of the supreme court (司刑少卿, Sixing Shaoqing). At that time, Wu Zetian's lover Zhang Changzong was accused of allowing the fortuneteller Li Hongtai (李弘泰) to prophesy that Zhang would be emperor one day. The censor Song Jing advocated that Zhang be arrested, a suggestion that Wu Zetian rejected. At Huan's further urging, Wu Zetian allowed Song to investigate, although she soon ordered the investigation terminated. Meanwhile, at that time, the chancellor Li Jiao advocated that the people who suffered at the hands of Wu Zetian's secret police officials, whom she entrusted with great power early in her reign, be restored in their reputation, a suggestion that Wu Zetian initially tabled, but after Huan suggested a compromise—that such restoration be limited to persons other than those accused of being involved in three military rebellions against her (those started by Li Jingye the Duke of Ying, Li Chong the Prince of Langye, and Li Zhen the Prince of Yue—Wu Zetian approved the proposal.