New wireless physical-layer designs are the key to improving wireless network performance. Adopting these new designs, however, requires modifications on wireless hardware and is difficult on commodity devices. In this paper, we show that this hardware modification in many cases can be avoided by TransFi, a new software technique that enables custom wireless PHY functionality on commodity WiFi transmitters via fine-grained emulation. Our basic insight is that many custom wireless signals can be emulated by manipulating the MAC payloads of WiFi MIMO streams and mixing the transmitted signals from these streams on the air. To perform such emulation, TransFi considers the target signal as a mixture of QAM constellation points on the complex plane, and reversely computes the MAC payload of each MIMO stream from one selected QAM constellation point. We implemented TransFi on commodity WiFi devices to emulate three custom wireless PHYs with diverse characteristics. Experiment results show that TransFi’s accuracy of emulation is >90% when transmitting emulated data payloads at 11.4 Mbps (46x faster than existing methods), and the decoding error at this data rate is <1% (10x lower than existing methods).