Base64 Encode / Decode
Convert text to and from Base64 encoding. Fully client-side.
About Base64 Encode / Decode
The Base64 Encode / Decode tool converts text to a Base64 string and back. Base64 is what you meet in Basic auth headers, JWT segments, data URIs and binary blobs embedded in JSON payloads.
Encoding represents bytes with printable ASCII characters, making text safe to place in formats that may not accept arbitrary byte sequences. Decoding reverses that representation; it does not authenticate, decrypt or validate the meaning of the recovered content.
Both directions run locally in your browser, so tokens and credentials never travel to a server. Use it for debugging and format conversion — not as a substitute for proper encryption when data must stay confidential.
How Base64 Encode / Decode works in practice
- 1Paste the text to encode, or the Base64 string to decode.
- 2Pick a mode: "Encode" (text → Base64) or "Decode" (Base64 → text).
- 3Optionally switch to the URL-safe alphabet when the value must travel in a URL or filename.
- 4Click the action button and copy the result.
Jobs this tool is built for
- Encode a UTF-8 string for a test payload or Basic Authorization header.
- Decode a Base64 value found in application logs to inspect its plain-text contents.
- Convert between standard and URL-safe representations when testing web tokens or query parameters.
- Verify that non-ASCII text such as accented names or emoji survives an encode/decode round trip.
What you can do here
- Two-way conversion with error handling for invalid Base64
- Safe handling of UTF-8 and multibyte characters
- URL-safe variant (- and _ instead of + and /)
- Fully client-side — no server round-trips
Limits and honest caveats
- Base64 is an encoding, not encryption. It only changes how data is represented — anyone can decode it, so never use it to protect passwords or secrets.
- Encoded output is roughly 33% larger than the original data because binary is packed into a limited text alphabet.
- Encoding and decoding run entirely in your browser, so nothing you paste is sent to a server.
Common questions about Base64 Encode / Decode
Why is my decoded text garbled?
The input probably was not text or used a different character encoding. Try switching between UTF-8 and Latin-1.
Can I encode binary files?
Use the Image to Base64 tool for images; this tool is for text input.
What is URL-safe Base64?
It substitutes `-` and `_` for the standard `+` and `/` characters so the value can travel more safely in URLs and filenames.
Why do some Base64 values end with equals signs?
The `=` characters are padding added when the input byte count does not divide evenly into Base64 groups. Some URL-safe systems omit that padding.
This page was written by the ToolSink team to explain how Base64 Encode / Decode works on this site — it is not syndicated, scraped, or spun from another publisher. How we write tool guides · Site updates · About ToolSink.
All Developer Tools
Tap any tool to jump straight in — no signup, works on mobile.