- Home
- Base64 Encoder
Base64 Encoder
Convert text to Base64 and decode Base64 back to text — UTF-8 safe, with optional padding and URL-safe input.
Text is encoded as UTF-8 before converting to Base64.
Copied to clipboard.
Copy failed — select the result text and copy it manually.
How it works
Paste or type into the input pane, choose Encode or Decode, and select the action. The result appears in the output pane and can be copied with one click.
Everything runs in your browser: the text you paste is never sent to a server.
What Base64 is
Base64 represents data as 64 printable characters — A–Z, a–z, 0–9, +, and / — so binary content can travel through text-only formats such as JSON, XML, email, and URLs.
Base64 is an encoding, not encryption: anyone can decode it, so it must not be used to protect data. If the encoded content is JSON, the JSON formatter can validate and pretty-print it after decoding, and generated identifiers such as UUIDs are often carried this way through text-only systems.
Encoding text safely
Text is first converted to UTF-8 bytes and then to Base64, so accented characters, CJK text, and emoji convert correctly.
Decoding converts the bytes back as UTF-8. Input whose bytes are not valid UTF-8 is rejected instead of producing garbled characters.
Assumptions and edge cases
- Whitespace and line breaks in Base64 input are ignored, so wrapped output from other tools decodes as-is.
- Padding is optional: both
aGVsbG8=andaGVsbG8decode to the same text. - The URL-safe alphabet replaces
+and/with-and_; it is accepted when decoding, while encoded output always uses the standard alphabet with padding. - Characters outside the alphabet, misplaced padding, and byte sequences that are not valid UTF-8 are rejected with an inline message.
- Nothing is compressed, encrypted, or uploaded: text is converted entirely in your browser.
- A short Base64 string is plain text, so it can be carried in a QR code; longer payloads exceed QR capacity.