Base64 Encoder & Decoder
Encode or decode Base64 text and files. Switch on URL-safe output for tokens or URLs, wrap long output when needed, and copy or download the result.
Input
Output
Drop file here or click to browse
Any file type supportedHow to Encode or Decode Base64
- Choose your mode — Use Text Mode for encoding/decoding text strings, or File Mode to encode any file to Base64.
- Enter your data — Paste text or Base64 string in Text Mode, or drop a file in File Mode.
- Click Encode or Decode — Copy the result or download it as a text file.
Features
- Encode text to Base64 (Unicode-safe)
- Decode Base64 back to text
- Encode any file to Base64
- URL-safe output and line wrapping
- Shows data URL for images
- Image preview for encoded images
Base64 encoder and decoder for text and files
Use Base64 Encoder to encode UTF-8 text, decode Base64 back to text, or convert a file into Base64 output. Base64 changes how data is represented; it does not encrypt or protect the content.
Example workflow
- Token-friendly text: Encode a short value, turn on URL-safe output, then copy it into a URL or token field.
- Inline image: Use File Mode with an image to get both raw Base64 and a complete data URL preview.
- Limits: Malformed Base64 shows a decode error, and very large files depend on browser memory.
For the next step, try JSON Formatter & Validator, Regex Tester & Log Extractor, Hash Generator, Unix Timestamp Converter.
Frequently Asked Questions
What is Base64 encoding?
Base64 is an encoding scheme that represents binary data as text. It is useful for data URLs, APIs, and transport formats, but it is not encryption.
Does Base64 encrypt my data?
No. Base64 is reversible encoding. Anyone with the encoded text can decode it, so do not use Base64 to protect secrets.
What is URL-safe Base64?
URL-safe Base64 swaps characters that can be awkward in URLs and tokens. Use it when the encoded value needs to travel inside a URL or token-like string.
What is a data URL?
A data URL combines a MIME type and Base64 content in a single string, such as data:image/png;base64,... for embedding small files inline.
Can large files be encoded?
File encoding depends on available browser memory. Very large files can be slow or fail to process.