Encode UTF-8 text or raw file bytes to Base64, or decode Base64 back to text — with optional URL-safe alphabet and PEM-style
line wrapping. Uses your browser’s btoa / atob with proper Unicode handling; nothing is uploaded.
No file loaded
Base64 encodes binary data into a printable ASCII alphabet (A–Z, a–z, 0–9, +, /) with padding =. It is widely used
for embedding small binaries in JSON, XML, email (MIME), and data URLs. It is not encryption — anyone can decode it — it is only an encoding for transport.
RFC 4648 also defines a URL-safe variant that avoids + and / for use in query strings.
DroidXP’s Base64 Encoder uses TextEncoder when available to turn your text into UTF-8 bytes, then btoa on
those bytes — so emoji and non‑Latin scripts round-trip correctly. Decoding uses atob plus TextDecoder to
produce UTF-8 text again. File encode reads the file as raw bytes (not UTF-8 text), which matches how you attach binary payloads.
File decode reads the file as text and treats it as Base64 (useful for PEM files or pasted blobs).
- / _ forms.Base64 is not a secret. Do not embed credentials or tokens in client-side only “encoding” — use proper encryption and transport security.
No. Encoding and decoding run in your browser. For sensitive material, still follow your organization’s policies on using web tools.
atob requires valid Base64 characters and correct padding. Remove spaces or line breaks if needed, or enable URL-safe mode if the string
uses - and _.
Buffer?
Conceptually yes for bytes, but always verify in your runtime: Node uses Buffer; browsers use btoa/atob with Latin-1 unless you
add UTF-8 helpers like this page does.
It replaces + and / with - and _ and often omits padding — common in JWT and query parameters. Toggle the option
when your consumer expects that alphabet.
Very large files can exhaust tab memory. This tool caps very long text input; for big binaries, use a CLI or streaming encoder on your machine.
Encode file uses the file’s raw bytes. Encode on typed text uses UTF-8 bytes of that text. If the file is already UTF-8 text, the bytes match what you would get from saving the same string — but binary files will differ.
Newlines are whitespace; decoders should ignore them. This tool strips whitespace when decoding so PEM-style wrapped lines still work.