Wei Xiaokuan (韋孝寬) (509 – 17 December 580[1]), formal personal name Wei Shuyu (韋叔裕) (but went by the courtesy name of Xiaokuan), known by the Xianbei name Yuwen Xiaokuan (宇文孝寬) during late Western Wei and Northern Zhou, formally Duke Xiang of Xun (勛襄公), was a general of the Xianbei-led Western Wei and Northern Zhou dynasties of China. He first became a prominent general during Western Wei as he defended the fortress of Yubi (玉壁, in modern Yuncheng, Shanxi) against a vastly larger army commanded by rival Eastern Wei's paramount general Gao Huan, and he eventually contributed greatly to the destruction of Eastern Wei's successor state Northern Qi by Northern Zhou. His final campaign, in 580, saw him siding with the regent Yang Jian against the general Yuchi Jiong in Northern Zhou's civil war, allowing Yang to defeat Yuchi and (after Wei's death) take over the throne as Sui dynasty's Emperor Wen.
More so than other prominent generals at the time, Wei was known for using atypical strategies in both offense and defense, including extensive use of espionage and forgeries to undermine the morale of opposing forces.