Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This is actually a pretty cool solution. I think it wouldn't have worked in the past, because atob and btoa were broken, but now they're not. Commented Apr 1, 2021 at 16:20
  • 2
    This is also about 7x faster than the one-liner from the other answer: new TextDecoder().decode(Uint8Array.from(atob(b64), c => c.charCodeAt(0))) Commented May 12, 2023 at 6:25
  • Thank you this solution also works with atob from react-native-quick-base64 Commented Aug 17, 2023 at 9:04