JavaScript Base64 bis Länge

    var byteLength = parseInt((str).replace(/=/g,"").length * 0.75));
Disgusted Dugong