Encoding does not change the randomness
Hexadecimal, Base64, and Base64url are different textual representations of the same random bytes. Select the encoding the destination explicitly accepts.
Handle generated keys as secrets
Copy the value directly into its secure destination. Do not place it in source control, URLs, analytics, screenshots, chat, or ordinary notes.