Base64 Encoder
This page opens Encode so Base64-looking input stays literal text. Enter a string for UTF-8 output or select a local file to encode its original bytes. Copy the result or download Base64 text; select standard or URL-safe output, padding and wrapping for the consuming format.
Converted output appears here.
·
- Direction
- Alphabet
- Encoding options
Auto is a guess based on decoded UTF-8 text. Select Encode to treat a Base64-looking string as literal text, or Decode for binary files. Both alphabets and omitted padding are accepted when decoding. Dropping a file encodes its original bytes.
Common questions
- How do I encode text, JSON or HTML as Base64?
- Paste the exact text into the input. Encode converts its UTF-8 bytes to Base64, including accents and emoji, and preserves line breaks as input data. JSON and HTML are treated as strings; no parsing, formatting or execution occurs. Copy output or Download Base64 text hands off the encoded value.
- What happens if I paste an already encoded value?
- Encode always encodes the literal input. QUJD becomes UVVKRA==, rather than ABC. Switch to Decode if you want the bytes represented by the input. To change an existing payload alphabet, decode it first, then re-encode the resulting text or file.
- Can I encode an image, PDF, ZIP or a Basic-auth pair?
- Encode a file reads original bytes and provides payload and data URI output. For a Basic-auth pair, enter username:password as text, use Standard, keep padding and turn wrapping off; add the Basic prefix in the consuming application. There is no authentication request, image compression, encryption or JWT signing.
Encoding preserves valid UTF-8 text or the original file bytes. Decoding restores those bytes; invalid UTF-8 is kept as binary data for download. Auto direction and inferred file types are best-effort guesses, and no file-format conversion or validation is performed.