Base64 Encoder and Decoder
Encode Unicode text to standard Base64 through UTF-8, or decode Base64 back to text, with strict padding and UTF-8 validation. Local calculation.
Local conversion in your browser, nothing sent. Base64 is a reversible encoding, not encryption.
Input
Enable JavaScript for local conversion. The guide remains accessible.
Results
Enter text, then choose Encode or Decode.
Understanding Base64
Base64 (RFC 4648) represents bytes with 64 characters: A–Z, a–z, 0–9, + and /. Each group of 3 bytes becomes 4 characters; = completes the last group. The result is about a third longer.
Encoding: text is converted to UTF-8 exactly as entered, without Unicode normalization or changes to spaces and line breaks, then to single-line Base64. “é” gives w6k=; “Hello” gives SGVsbG8=.
Strict decoding: standard alphabet only, spaces and line breaks ignored, mandatory padding and zero unused bits. Base64URL (- and _) and non-canonical forms are refused rather than corrected. The bytes must be valid UTF-8; any byte-order mark is kept.
Base64 is not encryption: anyone can decode it. Do not use it to protect a password or sensitive data.
Conversion runs in the browser; the tool sends and stores nothing. The result is shown as plain text, never interpreted as HTML. The clipboard and extensions can expose copied values.
RFC 4648 — The Base16, Base32, and Base64 Data Encodings, §4
Frequently asked questions
Does Base64 protect my data?
No. It is a reversible encoding without a key, meant to carry bytes as text.
Why is my Base64URL refused?
Base64URL replaces + and / with - and _ and often omits padding. The tool accepts standard Base64 only: replace those characters and add the padding.
Can I decode a binary file?
Only if the bytes form valid UTF-8 text. Otherwise the tool reports the error instead of showing altered text.
