The Quantangwen 全唐文 is a collection of all preserved prose style literature from the Tang 唐 (618-907) and Five Dynasties 五代 (907-960) periods. It was compiled in the early years of the 19th century by a team led by Dong Gao 董誥, Ruan Yuan 阮元 and Xu Song 徐松. It contains 18,488 literary pieces (including fragments) of 3,042 persons, arranged in 1,000 juan "scrolls". To each person a short biography is added.
There was a draft to a collection of Tang literature in the imperial library, the Tangwen 唐文 in 160 volumes, compiled by the early Qing period 清 (1644-1911) scholar Chen Bangyan 陳邦彥. Not being content with this draft, the Jiaqing Emperor 嘉慶 (r. 1795-1820) ordered compiling a new collection. This collection included older books like the Song period 宋 (960-1279) collection Wenyuan yinghua 文苑英華, the Guwenyuan 古文苑 and the Tangwencui 唐文粹. A few pieces were extracted from the Ming period 明 (1368-1644) encyclopedia Yongle dadian 永樂大典 and many other documentary collections, even some stone slab inscriptions served as primary sources.

Although the Quantangwen is a very valuable source that assembles all important pieces of literature of the Tang period it is by no means complete, contains errors (often question of attributing an essay to a wrong person) and doublings. A handful of modern scholars like Lao Ge 勞格 (Du Quantangwen zhaji 讀全唐文札記) and Cen Zhongmian 岑仲勉 have contributed to correct such errors. Pieces not included are, for example, novel-like writings like the Liu Yi zhuan 柳毅傳, Huo Xiaoyu zhuan 霍小玉傳 or Zhou-Qin xingji 周秦行紀.

The literary corpus is arranged according to persons, and secondary to the traditional types of literature as it has been developed in the Wenxuan 文選 and perpetuated in the Wenyuan yinghua.