Base64 Encode / Decode
Encode text to Base64 or decode Base64 to text, with full Unicode support and the URL-safe variant. Runs entirely in your browser.
Processed locally in your browser — nothing is uploaded.
Base64 Encode / Decode
0 characters
Base64
Output appears here…About Base64 Encode / Decode
Base64 encodes binary data as ASCII text for transport in URLs, JSON, headers, and data URIs. This tool encodes and decodes with proper UTF-8 handling — emoji and non-Latin text round-trip correctly, unlike raw btoa/atob — and supports the URL-safe alphabet used by JWTs.
Common uses
- Decode a Base64 value found in a config, header, or token
- Encode credentials or payloads for HTTP Basic auth and APIs
- Inspect data: URIs
Example
Input
Hello, world!
Output
SGVsbG8sIHdvcmxkIQ==
Frequently asked questions
Is Base64 a form of encryption?
No. Base64 is an encoding — a reversible way to represent bytes as text — and anyone can decode it without a key. Never rely on it to protect passwords, API keys, or other secrets.
Why does my Base64 string end with equals signs?
The = characters are padding that rounds the output up to a multiple of 4 characters, since Base64 turns every 3 input bytes into 4 output characters. Inputs whose byte length is divisible by 3 need no padding at all.
What is URL-safe Base64?
A variant defined in RFC 4648 that replaces + with - and / with _ so the result can sit in URLs and filenames without percent-encoding, and usually drops the = padding. JWTs use it, and this tool's decoder accepts both alphabets automatically.
Does the text I encode or decode get uploaded anywhere?
No. Encoding and decoding happen in your browser and nothing is transmitted or stored, so it is safe to decode values containing credentials or tokens.
Why does decoding say the result is not valid text?
The Base64 was valid, but the decoded bytes are not UTF-8 text — likely binary data such as an image, a hash, or compressed content. The tool shows a hex preview of the bytes instead of garbled characters.