Decode hexadecimal string

Decodes a string of hexadecimal character codes into characters.

by Prajeesh_PR

JavaScript

function hex2a(hex) {
    var str = '';
    for (var i = 0; i < hex.length; i += 2) str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
    return str;
}

alert(hex2a('3633323030303230303032414D30303230303230303030303030313233343534353030303030303030303130303030302B303030303030303030303030303830416C657373616E647261204665726E616E64657A2020202020202020202020202020202020202020202020204769756C69616E61204469617A202020202020202020202020202020202020202020202020202020202020203537363730343432343233333632313534343332343231314D30303030313131313038303230383032303030303030310D0A3730353230303030343033303330303143616C6C6520416E746F6E696F204E6172696E6F20323732202055726220204365726573202020417465205669746172746520202020202020203130303030303534363630303030303030303030303030303030303030304E6F727468656E204D6F756E7461696E732043656E7472616C202020202020202020202020202020202020202020202020202020202020202020383032383032313131343131303030313031393120303830323038303230303030303031'));