Keypairs.js is easy-to-use browser crypto in kilobytes, not megabytes.
It's a modern alternative to larger, legacy libraries like PKI.js and rsasign, with more universal support for keygen, signing, and verification (including PKI, X509, JOSE, JWS, and JWT) at a fraction of the cost.
This is intended to be explored with your JavaScript console open.
<script src="https://rootprojects.org/keypairs/bluecrypt-keypairs.js"></script>
<script src="https://rootprojects.org/keypairs/bluecrypt-keypairs.min.js"></script>
Documentation