Lawmakers in the Central American country's Congress voted by a "supermajority" in favor of the Bitcoin Law, receiving 62 out of 84 of the legislature's vote.
"The purpose of this law is to regulate bitcoin as unrestricted legal tender with liberating power, unlimited in any transaction, and to any title that public or private natural or legal persons require carrying out," the law reads.
Prices can now be shown in bitcoin, tax contributions can be paid with the digital currency, and exchanges in bitcoin will not be subject to capital gains tax.
Bitcoin is known for wild price swings that have prompted critics to suggest it is not suitable to be an effective currency. It's still unclear how El Salvador will ultimately roll out bitcoin as legal tender.
The exchange rate with the U.S. dollar "will be freely established by the market," according to the proposed law. El Salvador's current official currency is the U.S. dollar.