A bill that will allow all state workers to receive an electronic copy of their pay stubs was signed into law on Thursday by Gov. Andrew Cuomo.

The measure is meant to modernize a payroll system in which many state workers, including those who receive their pay through direct deposit, still receive printed copies of their stubs by mail or delivered by hand.

“In today’s day and age, most people manage their finances and pay bills online,” said Speaker Carl Heastie. “Allowing employees to have their paychecks directly deposited into their bank accounts is a wonderful convenience for both employees and their payroll departments. This legislation modernizes our payroll system by taking that initiative a step further and offering every state employee the option to view their pay stubs online, reducing financial and environmental costs.”

Workers going forward will have the option of receiving it electronically. The paperless option was only available at individual agency discretion and has only been partially implemented.

“With technology advancing, state government needs to keep pace, too,” said Assemblywoman Nily Rozic, a Queens Democrat who sponsors the legislation.

“By allowing all state employees to access their pay stub information online, we are cutting costs — both financially and environmentally. The enactment of this common-sense legislation is just one of the many ways we are continuing to modernize government and keep up with the times.”