All you need, parseIntand possibly String.fromCharCode.
parseInt takes a string and radix, aka the base from which you want to convert.
String.fromCharCode will accept the character code and convert it to the appropriate line.
So how can you convert C3to a number and, optionally, to a character.
var input = 'C3';
var decimalValue = parseInt(input, 16);
var character = String.fromCharCode(decimalValue);
console.log('Input:', input);
console.log('Decimal value:', decimalValue);
console.log('Character representation:', character);
Run codeHide result source
share