Base64 Encoder / Decoder
Encode or decode Base64 strings — client-side, nothing sent to any server.
Related Tools
// more about this tool
Why use this tool
Base64 is not encryption and doesn't hide anything from anyone who bothers to decode it; it's a way to represent binary data as plain text so it survives being passed through systems that only handle text safely, like embedding an image in a data URL, or putting a token in an HTTP header. Anyone can decode a Base64 string in one line of code, in any language.
In Flutter/Dart work, this shows up when decoding a JWT's payload (the middle segment of a JWT is Base64Url-encoded JSON), reading a data: URL you copied out of a network request, or checking what's actually inside a Basic Auth header before committing to debugging further down the stack.
How it works
- Pick Encode or Decode from the mode toggle.
- Type or paste your text — the output updates live as you type.
- Use Swap to flip the mode and move the current output into the input.
- Copy the result once it looks right.
Example
Encode
Input: Bilal é 日本語
Output: QmlsYWwgw6kg5pel5pys6KqeFAQ
Is Base64 secure or encrypted?
No — it's an encoding, not encryption. Anyone can reverse it instantly with one line of code in any language. Never rely on it to keep data secret.
Why does the encoded output sometimes end in = characters?
Base64 encodes data in 4-character blocks representing 3 bytes at a time; when the input length isn't a multiple of 3, = padding fills out the final block.
Does this handle non-ASCII/Unicode text correctly?
Yes — it encodes the UTF-8 byte representation of your text, so accented characters and non-Latin scripts round-trip correctly rather than getting mangled.
Where does Base64 show up in JWTs specifically?
A JWT's header and payload segments are both Base64Url-encoded JSON — the JWT Decoder tool on this site uses the same underlying encoding to read them.
What's the difference between Base64 and Base64Url?
Base64Url is a URL-safe variant that replaces the + and / characters (which have special meaning in URLs and file paths) with - and _, and typically omits the trailing = padding. This tool implements standard Base64; if you're decoding something Base64Url-encoded like a JWT segment, swap those characters back first.
Why would I ever need to manually decode a Basic Auth header?
An HTTP Basic Auth header is the literal string username:password encoded as Base64 — pasting the header value in here instantly shows you what credentials a request is actually sending, which is useful when debugging why an API call is being rejected as unauthorized.