I'm helping someone put a Native SegWit address (bc1...) on a website to collect Bitcoin donations.

I've found some javascript code that generates Private Key and Native SegWit address pairs offline. (I don't want to use a managed wallet. I prefer a paper wallet.)

I want to generate a couple "throwaway" pairs and test them to see if they are, indeed, legit. That is, the Native SegWit address indeed maps to the Private Key. How may I test this?

Update: here's an example of a pair:

  • L2xHquk5T9d7LZz27pDgMdrnisiLNkADscHcsJbNCs5qBStb3r1k
  • bc1qxhq4au5m74nv925fr6fzqaux3akn38gf3m9628

Update: I verified the pair was legit by using this tool: https://kimbatt.github.io/btc-address-generator/?page=address-details

  • 1
    If you verified the private key using an internet-connected tool, you should not use that key for receiving bitcoin. Stay Safe! Feb 1 at 0:44

1 Answer 1


You could try to import the private keys that the Javascript function gives you into wallet software like Electrum, then check that the associated payment address shows up on the 'Addresses' tab. You should be able to left-click on the payment address and use the option to display its private key, just to triple check if you wish.

  • Good suggestion, I just tried it. Unfortunately, Electrum only shows me a "Legacy" address, not the Native SegWit address. But thanks for the suggestion. Jan 30 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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