The Central American country's Congress voted on the program after the so-called Bitcoin Law was sent by Bukele, 39, to lawmakers on Wednesday, getting 62 out of 84 of the legislature's votes.
Bukele has praised the use of bitcoin for its potential to help Salvadorans living abroad to send payments back home while saying the U.S. dollar will also continue as legal tender.
"It will bring financial inclusion, investment, tourism, innovation and economic development for our country," Bukele said in a tweet shortly before the vote in Congress, which is controlled by his party and allies.
"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 says.
Prices for goods can now be displayed in Bitcoin prices. Residents can also pay taxes using digital currency, and exchanges in Bitcoin will not be subject to capital gains tax.
El Salvador's official currency is the U.S. dollar. According to the new law, the exchange rate with USD "will be freely established by the market." Approximately 70% of the country's population does not have passage to traditional financial services, according to the text referenced in the law. Making Bitcoin a legal form of tender is seen as a method to increase the financial composition.
The passage follows Bukele's announcement last week, where he said El Salvador reached a partnership with digital wallet company Strike to help build the country's Bitcoin-supported financial infrastructure.
Bitcoin's price rose 5% to $34,239.17 shortly after the vote, though the present price is still much lower than its record value of approximately $64,000 in April.
The law is supposed to go into effect in 90 days.
Despite the great reduction in value, Bitcoin is still up over 230% in the past 12 months, largely due to increasing interest by institutional investors, such as Tesla or Square, which have acquired vast quantities of the cryptocurrency.
The use of bitcoin will be optional for individuals and would not carry risks to users, Bukele said, with the government promising convertibility to dollars at the time of transaction through a trust created at the country's development bank BANDESAL.
Under the authority, bitcoin must be taken by firms when offered as payment for goods and services. Tax contributions can also be paid in cryptocurrency.