Alex Rivera | Logout

Base64 encoding and decoding in client-side Javascript

Asked 2010-05-12T15:25:00.810
409

Are there any methods in JavaScript that could be used to encode and decode a string using base64 encoding?

Edit
Report

1 Answer

66

In Gecko/WebKit-based browsers (Firefox, Chrome and Safari) and Opera, you can use btoa() and atob().

Original answer: How can you encode a string to Base64 in JavaScript?

answered 2011-01-15T13:11:38.220

Your Answer