Suicide bombings and other attacks in Kabul have killed and wounded hundreds of people this year and security is expected to deteriorate ahead of elections planned for October. Sexual harassment on the street is widespread.
The new retailers, with names like AzadBazar.af, afom.af, JVBazar.com and zarinas.com, sell goods ranging from cosmetics, computers, kitchenware and furniture to cars, rugs and real estate. One website advertises foreign brands including Rolex, Adidas and Zara.
Student Asila Sulaimani described online shopping as a "good experience" in a country at war, with U.N. figures putting those under 25 at more than 60 percent of the population, the vast majority of them enthusiastic smartphone users.
"Who dares go out shopping these days?" she said.
"I am sure there are some people, but for me it has always been difficult ... Fears of an explosion, an attack and the most common thing, harassment, follow me like my shadow."
Tamim Rasa, 28, is the founder of Rasa Online which he started with $30,000 eight months ago. He has since signed contracts with more than 60 stores and traders, with 80 percent of his customers women and cosmetics "a big part of business".
The store has no physical presence in terms of stock, just an office of eight.
"We work as a connecting bridge between people and large stores and traders. A month ago, we were hardly managing to earn our expenses - we were making a loss - but now we are making a profit of 1,000 to 3,000 afghanis ($14 to $42) a day. It shows we are growing."
He is now looking to expand to Herat province in the west, Kandahar in the south, Balkh in the north and Nangarhar, neighbouring Pakistan, in the east.
Esmatullah, 27, owner of Afghan Mart, which he set up just over a year ago, has a shop with 500,000 afghanis ($7,000) worth of goods.
"Big companies contact me to sell their imported goods. An average of 50 customers call me daily and we deliver," he said, adding that he too is looking to expand into the provinces by the end of the year.
The biggest challenge, he said, was security in a city where one bomb blast can be followed by a second in the same area.
Many people who have to go out take diversionary routes through narrow side alleys, sometimes through people's homes and gardens, to avoid the threat and traffic of major roads and intersections.
"We have seen more bomb blasts in Kabul that delayed our delivery services," Esmatullah said. "When that happens, we stop delivering in that direction or that part of the city.
"But the insecurity is one of the reasons that our business has found its way. And besides the insecurity, there is a bad culture of street harassment that unfortunately our women face in cities."
Goods are delivered by motorcycle or public transport where possible and the deliverymen get paid up to 8,000 afghanis ($112) a month.
Commerce Ministry spokesman Musafer Qoqandi described online shopping as "unique" for a country at war for more than four decades, with about 50 companies in business, most of them unlicensed.
"The culture of online stores only started two years ago in Kabul and right now more than 20 online stores have a licence to trade - there are many more that have yet to get their licence and we encourage them to come forward.
"Around the world, online stores are dealing with billions of dollars annually. It is time for us to join this convoy ... It is hope-giving when we see the growing number of such stores in Afghanistan."
Student Roya Shakeb agreed.
"I needed some books for my exams. I searched shops and libraries without success - then I came across online stores. The book was on my doorstep the next day. Unbelievable."