Encode and decode Base64 strings. Supports text and file input. Pure client-side.
Encoding Β· Base64 Β· data URLs
Encode text to Base64 or decode Base64 back to text in your browser. Handy for data URLs, debugging Basic auth headers, and inspecting encoded config blobs β with a clear reminder that Base64 is not encryption.
Base64 represents binary data using 64 ASCII characters (AβZ, aβz, 0β9, +, /, with = padding). It exists so binary can travel through systems that expect text: MIME email, XML/JSON string fields, and HTTP headers. Encoded output is about 33% larger than the input.
Anyone can decode Base64. It provides zero confidentiality. If you need secrecy, use real encryption and a proper key management story β not btoa.
Not encryption. βHiddenβ API keys in Base64 are still public to anyone who decodes them. Treat Base64 as transport packaging only.
- and _ instead of + and /, often without padding β different alphabet, same idea.data:image/png;base64,β¦ for small icons in HTML/CSS (keep payloads small).Authorization: Basic base64(user:pass); decode to debug which identity was sent (still send only over TLS).Input: DevToolBox
Base64: RGV2VG9vbEJveA==
Basic auth material:
user:pass β dXNlcjpwYXNz
Header: Authorization: Basic dXNlcjpwYXNz
| Variant | Alphabet notes | Where you see it |
|---|---|---|
| Standard | + / and = padding | MIME, many APIs, classic btoa |
| Base64url | - _, padding often omitted | JWTs, some query params |
Base64 encodes 3 bytes as 4 characters (~4/3 size), plus optional padding. That expansion is expected.
This page focuses on text workflows in the textarea. For large binaries, use local CLI tools (base64 on macOS/Linux) to avoid huge browser strings.
No β encode/decode run in the browser. Privacy Policy.