J.M. Barrie has often been credited with inventing the name Wendy. Supposedly it derives from a young girl called Margaret Henley, who liked to call Barrie "Friendy" but had difficulty pronouncing the R. As a result, "Friendy" became "Fwendy" and ultimately Wendy.
The truth is not quite so straightforward. Some historians claim the name was in use long before Peter Pan was published, and is Welsh in origin.
Doctor of Folklore Leslie Ellen Jones Ph.D. says on the History of Wendy:
"If Wendy is derived from a Welsh name, my candidate would be Gwendydd (pronounced Gwen-deethe, "white day"), which was the name of Myrddin (Merlin)'s sister (as in the poem Ymddiddan Myrddin a Gwendydd ei Chwaer). Barrie's "Wendy" was invented at a time when ancient Welsh names were becoming popular again, as an expression of intellectual nationalism."
There is also a suggestion on the same site that Wendy may have been a boy's name:
"I must admit to being annoyed when I tell people my name. They always insist on mentioning Peter Pan. During my family reseach I have come across the name Wendy twice in the 1881 census of England, one born 1840, and one born in 1880. The magazine Family History also states that Wendy, along with the names Marian and Shirley were once boys' names, and that in 1797 a boy named Wendy was apprenticed to some one in Glos."
Barrie certainly boosted the popularity of the name. According to Baby Names Hub, "Records indicate that at least 257,512 girls have been named Wendy since 1880 in the United States." In the UK, says Baby Names, the name peaked in the 1960s and has been in decline ever since.