Base64 Encoder & Decoder
Encode and decode Base64 for text (full UTF-8 / emoji support) and files. Supports URL-safe Base64, MIME line wrapping, Data URIs and image preview.
Input
0 characters · 0 bytes
Tip: press Ctrl+Enter to run the current mode.
Output
0 characters · 0 bytes
File → Base64
Base64 → File
How to Use the Base64 Converter
Text
- Type or paste text into the Input box
- Click Encode or Decode (with Live mode the result updates as you type)
- Enable URL-safe for base64url (
-and_, no=padding), e.g. for JWTs and URLs - Enable Wrap lines at 76 for MIME / e-mail compatible output
- Use Swap to feed the result back as input and reverse the direction
Files
- Switch to the File tab
- Drop a file or click to choose one — get raw Base64 and a ready-to-use Data URI
- To reverse, paste Base64 or a Data URI on the right and click Decode
- The file type is detected from its magic bytes; images are previewed and any file can be downloaded
What is Base64?
Base64 is a binary-to-text encoding that represents any data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is used to embed binary data in JSON, XML, HTML, CSS, e-mail (MIME) and URLs. Encoded output is about 33% larger than the original. Text is converted to UTF-8 bytes first, so accents, CJK characters and emoji round-trip correctly. Base64 is an encoding, not encryption.
Privacy & Security: All encoding and decoding — including files — happens entirely in your browser. No data is uploaded to any server.