Base64 Encoder Decoder
Base64 turns arbitrary bytes into ASCII so you can paste binary data into JSON, HTML, or a URL. This encoder and decoder runs in your browser: it does not encrypt anything, and anyone who sees the string can reverse it. Use it when a protocol asks for Base64, not when you need secrecy.
How to use the Base64 Encoder Decoder
- Paste the text or data URL. Put the raw string in the input. For a file you already encoded elsewhere, paste the Base64 text instead.
- Choose encode or decode. Encode produces the Base64 alphabet (A–Z, a–z, 0–9, +, /). Decode expects that alphabet and optional padding with =.
- Copy the result. If decode fails, the input is truncated or has characters outside the alphabet. Remove line breaks and try again.
When it helps
- Embed a small asset. Data URLs for tiny SVGs and icons start with a Base64 payload. Encode the file contents, then wrap them in data:image/svg+xml;base64,.
- Inspect a token payload. JWT segments are Base64URL, not encryption. Decode a payload only on a machine you trust, and prefer the JWT tool when you also need the header.
Common questions
Is Base64 encryption?
No. Base64 is a reversible encoding. It hides nothing from someone who knows the format. Use real encryption if the data is sensitive.
Why does my decoded text look garbled?
The original bytes were probably not UTF-8 text, or the string was cut off. Binary files decode to bytes, not readable characters.
What is the difference between Base64 and Base64URL?
Base64URL swaps + and / for - and _ and often drops padding, so the value can sit inside a URL or JWT without extra escaping.
Does the conversion leave my browser?
No. Encoding and decoding happen locally. Still avoid pasting secrets on a shared or logged computer.
Why is there padding with equals signs?
Base64 groups bytes into 6-bit characters. One or two = characters fill the last group when the input length is not a multiple of three.
Read the guide: Base64 Encoder & Decoder Online: Encode and Decode Instantly