WASHINGTON — THE House Judiciary Committee will hold a much-needed hearing today on cellphone unlocking. At stake is whether wireless consumers can be prosecuted for what, not long ago, was considered a routine practice.

Before 2012, if you bought and paid for a cellphone, the government didn’t prevent you from choosing your wireless carrier. Once your contract with your original carrier ended, you were free to “unlock” your phone — to make it usable on another wireless network — and switch to another carrier in order to get lower prices, faster service or better coverage.

No longer. Last October, the Library of Congress, which oversees the United States Copyright Office, decided that when a consumer unlocks her cellphone — a process that can be as straightforward as entering a code on the keypad — she may be violating the Digital Millennium Copyright Act of 1998. Essentially, the millions of Americans who try to take their phones with them when they switch wireless carriers are suddenly in the cross hairs of American copyright law. These consumers now face the prospect of harsh fines and even jail time.

The Library’s decision was based on a desire to protect the intellectual property rights to the software that “locks” a cellphone to a particular network — software for which each cellphone owner could be considered a licensee. The Library also noted that some wireless carriers allow unlocking and that unlocked phones are often available from third-party providers.