The percentage of its employees under the age of 30 hit an eight-year low of 7% in 2013, government statistics show, compared with about 25% for the private-sector workforce. Back in 1975, more than 20% of the federal workforce was under 30.

Without a pipeline of young talent, the government risks falling behind in an increasingly digital world, current and former government officials say.

Meanwhile, critics say that government hiring is confusing, opaque and lengthy, deterring even those who want to devote their lives to public service. The process is "deeply broken," says
Max Stier,
chief executive of the nonpartisan Partnership for Public Service, which aims to motivate a new generation of government workers.

Government officials acknowledge the current generational mix is a concern. About 45% of the federal workforce was more than 50 years old in 2013, and by September 2016, nearly a quarter of all federal employees will be eligible to retire, according to the Office of Personnel Management, the government's human-resources department. Overall employment at the federal, state and local level has fallen, shedding 928,000 employees between 2009 and 2013, according to the Bureau of Labor Statistics.

Katherine Archuleta,
OPM's director, says that increasing the share of young workers is a "challenge."
Kimberly Holden,
deputy associate director of recruitment and hiring at OPM, adds that the stakes are high and "the government will be lost" without technologically savvy staff able to carry agencies into a digital future.

Part of the problem is demand. An annual survey of undergraduates by employer-branding consultancy Universum indicates that student interest in working for the federal government has declined over the last four years. Of roughly 46,000 undergraduates polled in late 2013 and early 2014, just 2.4% of engineering students and .9% of business students listed only government employers as their ideal places to work.

The government's reputation for bureaucracy and hierarchy is driving away many workers, says
Paul Light,
a professor of public policy at New York University who studies youth career paths. Unlike their parents, today's young workers don't consider the government to be a haven of stability and long-term job security, he says, especially after last year's shutdown.

In addition, he notes, the baby boomers, once projected to retire in droves from federal work, are instead "hanging on," limiting job openings and mobility. "The federal government used to be an employer of choice," he says, "and now it's an employer of last resort."

Jeremy Warren
spent seven years in government, starting at the age of 29. The former chief technology officer at the Justice Department left government work in 2011, he says, because he wanted to be "driving a speedboat rather than pulling an oar on an ocean liner."

He says he tackled plenty of challenging projects, but he also recalls spending years persuading various leaders in different offices to support a proposal, squeezing a project into a budget request and then worrying that funding would vanish. "It's a tough way to go to work each day," says Mr. Warren, now 40 years old and the vice president of innovation at home-automation company Vivint Inc.

OPM's Ms. Holden maintains that federal work is still an alluring choice for many students, especially those who desire meaningful work.

At agencies like NASA, where the mission has shifted from flying space shuttles to sending humans to Mars, a significant slowdown in hiring young workers—coupled with looming retirements—could delay "critical programs," such as a planned space telescope, says Jeri Buchholz, the agency's chief human capital officer.

And absent a youth injection, already risk-shy government agencies may grow even more averse to change, says Richard Boly, a retired director at the State Department.

Government agencies still depend too much on prior experience when judging even entry-level candidates and don't recruit as nimbly as private-sector concerns, says Mr. Stier, of the Partnership for Public Service.

For example, he says, agencies make college-recruiting visits in the spring, after many seniors have already accepted job offers, and they look for candidates only when they need them rather than maintaining relationships with university contacts and developing a pool of available talent.

More

But OPM's Ms. Holden says that the agencies do maintain relationships with university contacts, and she cites "tons of" entry-level positions that require only an academic degree or general experience, adding that she herself was an intern nearly 30 years ago.

Her department is also identifying barriers to recruiting top talent and working to make job descriptions—often laden with acronyms and complex jargon—clearer. In addition, some agencies are adopting recruiting tactics from the private sector, rolling out a mobile-careers app and taking to social media to attract applicants. According to OPM, nearly a quarter of full-time hires for the federal executive branch were less than 30 years old last year, a figure that has changed little in the past four years. "We are looking at untying those knots and making sure the public understands how they can apply for federal positions," Ms. Holden says.

Still, agencies intent on breathing new life into their hiring processes face constraints. Budget battles "hamstring" agencies' ability to do proper workforce planning, Mr. Stier says. And while strict recruiting rules are meant to ensure fairness in hiring, they can frustrate managers.

Mr. Boly, who spent 20 years in State Department diplomatic roles before retiring, recalled hearing about a star candidate from Google Inc. who had applied in 2009 for a job running an online program connecting U.S. students with government workers abroad.

The candidate never made it to the list of acceptable potential hires because a lower-level employee screened the person out. "The process itself is this black box that is not efficient and a little slow and may not always surface the best candidates," Mr. Boly says.

A State Department spokeswoman responds that "the department adheres to governmentwide hiring regulations as established by the Office of Personnel Management."

Officials like Ms. Archuleta acknowledge that government needs to change the way it sells itself to young people. She recently traveled to Silicon Valley, collecting advice on recruiting and retaining young workers from leaders at LinkedIn Corp. and
Facebook Inc.

Andrew McMahon,
who is 31 and a senior adviser at the General Services Administration, helped start the Presidential Innovation Fellows, a three-year-old program that pairs private-sector software developers and technology workers with government employees for stints of six-to-12 months. The program's goal: to get talented people to focus their attention on government issues, even if only for a little while.

As for Mr. McMahon, he says he expects to head to the nonprofit world or the private sector eventually, maybe returning to government later.

At NASA's Johnson Space Center, about 89% of the interns it takes in through the Pathways program for young workers accept jobs after completing internship rotations, according to the center's intern coordinator. But the number of employees under the age of 30 has held steady at 7.7% agencywide over the last few years, Ms. Buchholz says, because NASA downsized after the space-shuttle program was shut down.

Younger NASA workers solve problems differently than their older counterparts, she adds, describing them as "shameless in a good way"—unafraid to ask to borrow a part, for example.

Allissa Battocletti, 26, who was hired at Johnson after five intern rotations, says her job teaching astronauts how to walk in space is "a dream," but she's had moments of doubt about her career path.

The cancellation of a NASA spaceflight program in 2010 made her realize that government work comes with uncertainty. She now views her career more flexibly. "I don't have to stay here forever," she says. "I can see what opportunities arise, see how I feel in 10 years."