Base64 encode
Encode any UTF-8 text as Base64 in your browser. Safe for tokens, IDs, and internal payloads.
Runs in your browser Instant No signup, no tracking
About this tool
Encode UTF-8 text into Base64 — the encoding used for HTTP Basic auth headers, data URIs, JWT payloads, and lots of internal APIs. Unlike `btoa()` alone, this tool safely handles multi-byte characters (emoji, accented letters, CJK) by UTF-8-encoding first. Runs entirely in your browser.
Example
Paste the input on the left and you will get output like this:
Sample Text
Hello, world! 👋
Resulting Base64
SGVsbG8sIHdvcmxkISDwn5GL
How to use Base64 encode
- Paste or type your Text into the left pane.
- The Base64 appears instantly in the right pane. Conversion runs in your browser — nothing is uploaded.
- Copy the result to your clipboard or download it as a file.
FAQ
- Does this handle Unicode?
- Yes. Input is UTF-8-encoded before Base64 encoding, so emoji and non-ASCII characters round-trip cleanly.
- Is the output URL-safe?
- No — it uses standard Base64 (with `+`, `/`, `=`). For URL-safe Base64, replace `+` → `-` and `/` → `_`.
- What about binary files?
- This tool handles text. For binary files, use your OS: `base64 < file.bin` on macOS/Linux.