Base64 Encode / Decode
Base64 encodes binary or text data into printable ASCII characters. It is widely used to embed data inside text protocols such as JSON, CSS and email. This ToolBox Base64 tool runs entirely in your browser for encoding and decoding, supporting both strings and files.
Key Features
- Text to Base64 and Base64 to text, both directions
- File to Base64: turn images or files into data URIs
- URL-safe mode: replace + / = with - _ and drop padding
- One-click copy of the result
- Large-file chunking to avoid UI freezing
- Client-side only, nothing uploaded
Use Cases
- Inline a small icon as Base64 in CSS to reduce requests
- Transport binary data through text-only APIs
- Embed attachments inside email bodies
- Debug API payloads that contain Base64 fields
How to Use
- Pick Encode or Decode mode
- For encode: paste text or choose a file; for decode: paste a Base64 string
- If you need URL compatibility, enable URL-safe
- Click convert and see the result instantly
- Copy or download the output
Practical Tips
- Base64 adds about 33 percent size overhead, so avoid it for long-term large-file storage
- Inline Base64 suits small icons; use a separate cached file for big images
- Before decoding, confirm standard Base64; URL-safe strings must be converted back first
FAQ
- Is Base64 encryption?
- No. Base64 is only encoding and anyone can decode it. Never use it to protect sensitive data.
- What if the data URI is too long?
- The source file is likely large; reference it as a separate file instead of inlining.