Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

346
Views
Javascript - atob decode base64

Javascript - atob in base64 returning string with special characters.

I tried to use some suggested solution found but it didn't work for me.

Like for example:

function b64DecodeUnicode(str) {
  return decodeURIComponent(atob(str).split('').map(function(c) {
      return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  }).join(''));
}

console.log(b64DecodeUnicode('b64...'));

Result:

return decodeURIComponent(atob(str).split('').map(function(c) {
         ^

URIError: URI malformed

This base64 represents this image:

image

On this site you can convert it to base64: converter

I need to decode base64. This function will be used by multiple files and not just this image.

The expected string starts like this:

ÿØÿà  JFIF          ÿþ  Compressed by jpeg-recompressÿÛ C  
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!