If you’re working in Node or using Browserify, you can use
var base64String = Buffer.from(hexString, 'hex').toString('base64')
or
var hexString = Buffer.from(base64String, 'base64').toString('hex')
More Related Contents:
- How to convert hex string into a bytes array, and a bytes array in the hex string?
- Decode Base64 to Hexadecimal string with javascript
- Create a hexadecimal colour based on a string with JavaScript
- How do I replace a character at a particular index in JavaScript?
- How to check if a string “StartsWith” another string?
- How can I use backslashes (\) in a string?
- How to find if an array contains a specific string in JavaScript/jQuery?
- Check for special characters in string
- String to object in JS
- Get Base64 encode file-data from Input Form
- How to build query string with Javascript
- Using raw image data from ajax request for data URI
- javascript regular expression to check for IP addresses
- Replace all spaces in a string with ‘+’ [duplicate]
- Passing regex modifier options to RegExp object
- Recursively print all permutations of a string (Javascript)
- How do I split a string into an array of characters? [duplicate]
- JS – get image width and height from the base64 code
- Convert base64 png data to javascript file objects
- Get the weekday from a Date object or date string using JavaScript
- detect differences between two strings with Javascript
- how to convert a string to a Unix timestamp in javascript?
- Are ES6 template literals faster than string concatenation?
- How Can I Truncate A String In jQuery?
- Javascript / Jquery – Get number from string
- How to test if a URL string is absolute or relative?
- compare strings and get end difference
- Removing backslashes from strings in javascript
- javascript and string manipulation w/ utf-16 surrogate pairs
- JavaScript: replace last occurrence of text in a string