Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 323 Bytes

base64_js.md

File metadata and controls

15 lines (11 loc) · 323 Bytes

Base64 encode or decode in JavaScript Back

  • Browse Context:

    btoa('test'); // => "dGVzdA=="
    atob('dGVzdA=='); // => "test"  
  • NodeJS Context:

    Buffer.from('test').toString('base64'); // => "dGVzdA=="
    `${Buffer.from('dGVzdA==', 'base64')}`; // => "test"