🔒 Privacy: everything runs in your browser. Nothing is uploaded.
About this base64 encode / decode
Base64 is a way of writing binary data using only 64 printable characters (A–Z, a–z, 0–9, + and /). It is everywhere in web development: data URIs for small images, HTTP Basic Auth headers, JSON Web Tokens, email attachments (MIME) and API payloads that cannot carry raw bytes. This free Base64 encoder and decoder converts in both directions instantly, entirely inside your browser.
Many simple online converters break on non-English text because the browser function btoa() only accepts Latin-1 characters. This tool first converts your text to UTF-8 bytes, so accented letters, Chinese, Arabic and emoji round-trip correctly. A URL-safe option replaces + and / with - and _ and drops the = padding, which is the variant used by JWTs and many URL parameters.
Common real-world uses include embedding a small icon directly in CSS as a data URI (data:image/png;base64,...), inspecting the payload section of a JSON Web Token while debugging authentication, preparing credentials for an HTTP Authorization: Basic header, and moving binary configuration through environment variables or YAML files that only accept text. When you decode a JWT, remember that the header and payload are only encoded, not encrypted, so anyone holding the token can read them. Treat Base64 strings that contain credentials with the same care as the plain-text values they represent.
How to use it
- Paste plain text into the box and click Encode to get Base64.
- Paste a Base64 string and click Decode to get the original text back.
- Tick URL-safe when the result goes into a URL, a filename or a JWT.
- Copy the output. Invalid input shows an error instead of garbage.
FAQ
Is Base64 encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
Why is the output longer than my input?
Base64 represents every 3 bytes with 4 characters, so encoded data is about 33% larger than the original.
Is my text uploaded?
No. Encoding and decoding run in JavaScript on your device; nothing is sent to a server.
What is the = at the end?
It is padding that makes the length a multiple of 4. URL-safe Base64 usually omits it, and this decoder adds it back automatically.