Skip to tool

JavaScript btoa() with UTF-8 Online

Encode text as Base64.

The output updates as you type. The tool processes input in your browser.

Worked example

The browser encodes text as UTF-8 bytes before Base64. The result can be decoded back to the original bytes.

Sample input
Café
Sample output
Q2Fmw6k=

Using this operation in JavaScript

The interactive result uses JavaScript. JavaScript string indexes count UTF-16 code units. Use code-point iteration when working with supplementary Unicode characters.

JavaScript reference