The so-called "Bitcoin Law" was originally proposed by President Nayib Bukele and passed the nation's legislative body with a majority of votes (62 out of 84).
The legislation also says that the government will provide training on how to access bitcoin transactions as well as alternatives that allow people to carry out transactions in bitcoin and have "automatic and instant convertibility" from bitcoin to U.S. dollars, the nation's primary currency.
The exchange rate between bitcoin and U.S. dollars will be "freely established by the market," the law states.
The law notes that some 70% of the nation's population does not have access to traditional financial services, and paints bitcoin as a tool for democratizing wealth in the nation of about 6.4 million.
The move will also help the around 1.5 million Salvadorians living abroad digitally send remittance back home.
The small Central American nation's new law comes amid a slew of global announcements that have helped push cryptocurrency use mainstream.
U.S.-based financial services platform Venmo recently announced it would let users buy, sell and store cryptocurrencies on its app. Venmo's announcement comes on the heels of its parent company, PayPal, saying it would let users make online purchases using crypto.
Earlier this year, the popular cryptocurrency exchange platform Coinbase also became a publicly-traded company listed on the Nasdaq in what some dubbed a "watershed" moment for digital currencies.
Bitcoin has courted controversy for the environmental impact of its mining process, which involves the use of specialized computer servers that consume immense amounts of electricity and in some cases rely on energy from fossil fuels.
Bitcoin has also stoked concerns among economists for its volatility and is known for having its price swing wildly -- sometime for hard-to-place or seemingly random reasons. State-backed financial institutions in China warned against cryptocurrency use last month due to its volatility.
Bitcoin was trading at approximately $36,430 at 11:15 a.m. ET on Wednesday, an approximate 15% increase from 24 hours prior. It is a steep drop, however, from Bitcoin's all-time high of nearly $65,000 the currency hit in mid-April.