Developer Tools

Base64 Encoder & Decoder

Encode UTF-8 text or files and decode standard or URL-safe Base64, with direct downloads.

Your inputs

UTF-8 text or files up to 20 MiB. Base64 is encoding, not encryption.

Your results

How to encode text and restore files with Base64

Use Base64 when a system needs bytes as text, such as an API field or configuration value. Text uses UTF-8; files use their original bytes. Encoding is reversible and provides no encryption.

Step by step

  1. Select encode or decode, then choose text or file input. Paste the payload or select a file.
  2. Choose the matching Base64 alphabet. For decoding, paste only the payload; remove any data URL prefix.
  3. Run the conversion. Copy readable text or download the result; binary output is saved as a file.

Settings and limits

Standard or URL-safe alphabet
Standard uses + and /; URL-safe uses - and _. Match the format required by the receiving system.
Padding
Keep = padding unless the receiving system requests unpadded output. Decoding accepts valid padded and unpadded payloads.
File size and binary output
File input is limited to 20 MiB. Binary results show a hexadecimal preview; the download contains all decoded bytes.

Worked example

Encode Hello, 世界 👋 using standard Base64 with padding. The expected payload is SGVsbG8sIOS4lueVjCDwn5GL.

Example input

Hello, 世界 👋

Expected result

SGVsbG8sIOS4lueVjCDwn5GL

Decode the payload to recover the same text. For +w==, use the standard alphabet: the result is the single byte FB, downloaded as decoded.bin rather than readable text.

Questions and troubleshooting

Why does decoding fail?

Check the alphabet, padding and input characters. Spaces and line breaks are accepted, but data URL prefixes and unrelated punctuation are not.

Why is Base64 larger than the source?

It represents each group of 3 bytes with 4 characters, plus padding when needed. It encodes data rather than compressing it.

Can I recover the original filename?

Base64 stores bytes, not filenames or file types. Keep that information separately and rename decoded.bin only when you know its format.