Josh Springer huddled over two computer screens, immersed in the final hours of a website redesign, shifting images and text from one server to another and smoothing out online hiccups.

It was his company’s biggest launch ever. But when the new site finally glimmered on screen last month, Mr. Springer didn’t celebrate with a team of programmers in Lower Manhattan’s Silicon Alley, the city’s hot tech corridor. He savored the moment alone at a desk in his studio apartment in Sunnyside, Queens, just nine paces from the kitchen where he blends the spinach-avocado smoothies that power him through his solitary workdays.

He is 32 and a member of New York City’s growing tribe of independent contractors and freelancers who are hoping to transform hardship into opportunity on the sidelines of the nation’s traditional 9-to-5 economy.

Like many other millennials, Mr. Springer chose his path after being slammed by the Great Recession and the sluggish economic recovery that has followed. Since leaving college in 2005, he has been laid off twice, most recently in 2011. Last year, after the unemployment checks finally ran out, he set out on his own as a website developer and social media consultant.