Base64 Encoder/Decoder
Encode and decode Base64 strings instantly
The Base64 Encoder/Decoder converts UTF-8 text to standard Base64 and back again in your browser. It is useful for debugging headers, embedded strings, and encoded payloads, and it also shows simple size stats so you can see the overhead Base64 adds. Everything runs locally, with no server round-trip.
All processing runs locally in your browser. Your files and text are not sent to Tool-web's server.
How to Use
- Paste plain text or a Base64 string into the input box
- Choose Encode or Decode mode
- Review the processed output and the size stats below it
- Copy, download, share, or swap the result back into the input if you need another pass
Features
- Standard Base64 encode and decode modes
- UTF-8 text support
- Live processing after a short debounce plus manual action button
- Copy, download, share, swap, and reset controls
- Character and byte counts for both input and output
Tips for getting Base64 Encoder/Decoder right
- Remember Base64 encodes but doesn't hide — don't treat it as security
- Expect the encoded output to be about a third larger than the input
- Normalize URL-safe Base64 manually before decoding if the source came from a JWT or URL parameter
- Trim stray whitespace from pasted data before decoding to avoid errors
Worked example: build an HTTP Basic auth header
Enter `username:password` in Encode mode and copy the Base64 output into your `Authorization: Basic ...` header. If you later need to inspect a captured value, swap to Decode mode and paste the Base64 string back in to confirm the original credentials format.
Standard Base64 vs URL-safe Base64
- This tool produces standard Base64 output with `+`, `/`, and padding when needed
- JWTs and some URLs often use the Base64URL variant instead
- If a Base64URL value fails to decode, convert `-` to `+`, `_` to `/`, and restore missing padding first
- Base64 changes representation, not security — encoded data is still readable after decoding
Real-World Use Cases
- Encoding credentials or tokens for debugging workflows
- Decoding Base64 payloads from logs or browser tools
- Inspecting text blobs embedded in APIs or config files
- Preparing plain text for transmission through text-only channels
- Checking how much Base64 increases the size of a payload
Best Practices
- Treat Base64 as representation only, not as protection
- Trim obvious whitespace before decoding copied values
- Verify a decoded result matches the original source before using it in production debugging
- Keep an eye on the byte counts when Base64 size matters
- Use Swap when you want to decode what you just encoded or vice versa without repasting
Common Mistakes to Avoid
- Confusing Base64 encoding with encryption
- Pasting a Base64URL string into the decoder without normalizing it first
- Forgetting that Base64 expands the payload size
- Mixing up encode and decode mode before copying the result
- Trying to use this text-only tool for file encoding workflows
Troubleshooting
- If decoding fails, check for invalid characters or missing padding
- If a JWT-like value fails, normalize the Base64URL characters before decoding
- If text looks corrupted, confirm the original source was UTF-8 text
- Use Reset when you have switched modes several times and want a clean start
- Make sure you are pasting plain text rather than a binary file dump
Frequently Asked Questions
What is Base64?
Does it support Unicode?
Can I encode files?
Privacy & Security
Base64 encoding and decoding happens entirely in your browser. No data is transmitted to any server. However, remember that Base64 is not encryption — it provides no privacy protection.
Tips & Best Practices
- Remember Base64 encodes but doesn't hide — don't treat it as security
- Expect the encoded output to be about a third larger than the input
- Normalize URL-safe Base64 manually before decoding if the source came from a JWT or URL parameter
- Trim stray whitespace from pasted data before decoding to avoid errors
Comments
0/1000
Explore more Developer Tools
Browse all tools in the Developer Tools collection.