Encode text or read a Base64 string

Paste directly into the text field. Conversions run in your browser; there is no file upload, remote URL fetching or file download.

  1. Paste text and choose Encode: Hello produces SGVsbG8=.
  2. To decode, put the Base64 string into the same input field and choose Decode.
  3. Copy the result after a successful conversion. Clear empties both the input and result.

UTF-8 bytes, padding and rejected input

Unicode text becomes standard Base64

The text 你好 😀 encodes to 5L2g5aW9IPCfmIA=. Output uses A-Z, a-z, 0-9, + and /, adds = padding when needed, and has no line wrapping. Leading and trailing text whitespace stays intact. Unpaired UTF-16 surrogates are rejected; empty input is a valid empty conversion.

Missing padding is not the same as broken data

Decoding ignores only ASCII space, tab, CR, LF and form feed. If no = is present, missing padding is restored when possible: SGVsbG8 decodes to Hello. Incorrect, incomplete or excess padding, a remaining length of 4n+1, and trailing junk such as SGVsbG8=!!! are rejected.

Padding bits must be zero: Zg== decodes to f, while Zh== is rejected. A is also invalid.

Valid Base64 can still contain invalid UTF-8

/w== has valid Base64 syntax but does not decode to valid UTF-8 text. An error clears the previous result and disables copying. A UTF-8 BOM is retained as the actual U+FEFF character.

Questions about Base64 text conversion

Can I decode Base64URL or a data URL?

Explicit Base64URL characters - and _ are rejected, as is a data:text/plain;base64, prefix. Paste only the payload if it represents UTF-8 text. There is no Base64URL mode; standard Base64 is not URL percent encoding.

Can this decode an image or archive?

It returns UTF-8 text, not binary files. Valid Base64 alone does not make an image or archive supported input.

Does Base64 keep text secret?

No. It is reversible encoding without a key, not encryption, and provides no confidentiality.

Recent tools: