The Qianziwen 千字文 "Thousand-characters text" is a character text book for elementary learning. There are two books with that title, namely one from theLiang period 梁 (502-557) writer Prince Xiao Zifan 萧子范, which is already lost, and one by Zhou Xingsi 周兴嗣 from the same period. The book was compiled on imperial order by using one thousand characters of the oeuvres of the famous calligrapher Wang Xizhi 王羲之 from the Eastern Jin period 东晋 (317-420). Zhou selected one thousand different, often-used characters and composed them to a long poem, of which each verse is 4 words or characters long. Each two verses rhyme, so that they are easily to remember. The words cover all aspects of nature and human life, and thus also serve to learn the most important characters of all fields, like the universe, history, self-cultivation, learning, eating and drinking, living, gardens, sacrifices, and much more.

The characters of the Qianziwen serve for numbering a large amount of chapters, books or other data. Each character represents a number, like 天=1, 地=2, 玄=3, 黄=4, 宇=5, 宙=6, 洪=7, 荒=8,... 焉=997, 哉=998, 乎=999, 也=1000. One example for this method is the numbering of the juan "scrolls" in some editions of the Daoist Canon Daozang 道藏.

The Qianziwen was so popular that it was translated into Manchurian during the Qing period 清 (1644-1911).

There were several supplements or alternatives written, like Shi Qiwei's 侍其玮 Xu qianwen 续千文 and Ge Gangzheng's 葛刚正 Chongxu qianwen 重续千文 and Ge Gangzheng's 葛刚正 Sanxu qianwen 三续千文 from the Song period 宋 (960-1279), Zhou Lüjing's 周履靖 Guangyi qianwen 广易千文 and Li Deng's 李登 Zhengzi qianwen 正字千文 from the Ming period 明 (1368-1644), and He Guizhen's 何桂珍 Xunmeng qianziwen 训蒙千字文 from the Qing period. The Xu qianwen is included in the collectanea Yunzizaikan congshu 云自在龛丛书 and Yiyuan bilu chuke 艺园秘录录初刻.

Some small texts imitating the pattern of the Qianziwen are: Xu gu qianwen 叙古千文 by the Song period scholar Hu Yin 胡寅, with a commentary by Huang Hao 黄灏; Jiejing zazi 快捷方式杂字; Baoju zazi 包举杂字; and Nongcun zazi 农村杂字.