I know there is a similar question but its 7 years old and the answer doesn't work. Now, many things have changed, including the addresses themselves. So, is there a js library I can trust that can validate addresses on 2021

1 Answer 1


Use bitcoinJS's https://github.com/bitcoinjs/bitcoinjs-lib/blob/27a840aac4a12338f1e40c54f3759bbd7a559944/src/address.js#L101 toOutputScript function in a try-catch block


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.