Base64 Encoder
Encode text to Base64 or decode it back
Encode any text to Base64 or decode a Base64 string back to readable text. Full UTF-8 support means emoji, accents, and non-Latin scripts round-trip safely.
Why Base64 exists
Many systems — email headers, HTTP Basic Auth, JSON Web Tokens, data URIs, old protocols that predate UTF-8 — expect their payloads to be plain ASCII. Base64 solves this by encoding arbitrary bytes using only 64 safe characters (A–Z, a–z, 0–9, + and /). The tradeoff is about 33% size inflation, but in exchange you can shuttle binary data through text-only channels without corruption.
Typical use cases
- Embedding small images directly in CSS or HTML via data: URLs.
- Setting Authorization: Basic headers (the credentials are Base64 of username:password).
- Inspecting the header and payload halves of a JWT, which are base64url encoded.
- Transmitting binary data (like file contents) inside JSON fields.
- Obscuring configuration values — note: Base64 is NOT encryption, anyone can decode it.
Base64 vs base64url
Standard Base64 uses + and / which can cause issues in URLs and filenames. base64url (used by JWTs) replaces those with - and _ and drops the = padding. This tool handles standard Base64; for JWT inspection use the dedicated JWT decoder which handles the url-safe variant.
Frequently asked questions
Is Base64 encryption?
No. Base64 is reversible encoding — anyone can decode it with no key. Do not use Base64 to hide passwords or sensitive data. Use real encryption (AES, for example) for that.
Why does encoded output sometimes end with = or ==?
Those are padding characters that align the output to a multiple of 4. They are meaningful — do not strip them unless you are converting to base64url.
Can I encode binary files here?
This tool encodes text. For files, most programming languages have one-line Base64 functions (btoa/atob in JavaScript, base64.b64encode in Python). If you need a file-to-Base64 tool, let us know.