Strapping on a virtual reality headset can digitally transport a person under the sea, to the red surface of Mars or even inside the human body.

But purchasing a virtual reality headset isn’t cheap, especially for low-income families.

Teaming up with the California State Library, Facebook’s Oculus said Wednesday it hopes to bridge the digital divide by donating 100 sets of Rift headsets, touch controllers and computers to 90 libraries throughout California as part of a new pilot program.

Participating libraries include those in San Jose, Berkeley, Oakland, Sunnyvale, Campbell and other locations in the Bay Area.

“By having access, it takes away the mystery of what it is and inspires,” said Cindy Ball, Oculus’ education program manager. “No matter how many videos or news reports you’ve seen about VR, once you put on that headset for the first time, that’s when you really get it.”

Califa Group, a San Mateo nonprofit, is overseeing the program.

VARLibraries — a network of libraries sharing best practices for implementing virtual and augmented realities — will run daily operations and deployment of the equipment.

The Oculus Rift and touch controllers cost $598 and an Oculus-ready laptop costs more than $1,000, according to the tech firm’s website.

By making the technology available in libraries, families can try out virtual reality without purchasing a headset, the tech firm noted. Oculus is rolling out the program over the next three months and said it was hoping to identify best practices by the end of the first year.

Facebook purchased virtual reality startup Oculus in 2014. The social media firm paid $2 billion to acquire the company and shelled out another $1 billion for employee retention bonuses and other deals.

Since then, Oculus has faced competition with similar products, including the HTC Vive and the PlayStation VR, a lawsuit, shipment delays and a leadership shakeup at the tech firm.

But the company’s executives have said they expect it will take years before the technology becomes mainstream. One of the barriers to adoption has been the price of virtual reality headsets, although there are lower quality options available.

The pilot program covers fewer than 10 percent of all California library branches, but includes nearly half of the state’s 184 library jurisdictions, Oculus said.

Ball said that the tech firm doesn’t plan to donate virtual reality equipment to the entire state, so if the pilot program goes well, the California State Library will have to allocate or raise more funding to expand it to other locations.

Oculus is also exploring a similar pilot program in Washington state.

The tech firm will keep an eye on how much the equipment is used, and libraries will collect optional survey data, Ball said.

“We’ll be watching to see what the sentiment is,” she said. “Hopefully it’s positive.”