Base64 encode and decode
Decode Base64 to text, or encode text as standard or URL-safe Base64.
Free, no sign-up.
Base64 encode and decode
How Base64 works
Base64 takes the data three bytes at a time and writes each group as four characters from a 64-character alphabet: A to Z, a to z, 0 to 9, + and /. So the result is about a third longer than what went in. When the data doesn't divide into groups of three, = fills the last group: "Hello, world!" is 13 bytes and becomes 20 characters ending in ==.
It encodes bytes, not letters. Text is turned into bytes first, and this page uses UTF-8, so é becomes two bytes and encodes as w6k=. If Base64 holds something that isn't text, such as an image, this page says so instead of showing garbled characters.
Where you meet it
Data URLs that put a small image straight into a web page (data:image/png;base64,...), email attachments, API fields that carry files, and the Authorization: Basic header, which is just the user name and password joined by a colon and encoded. Because anyone can decode that header, Basic authentication is only safe over HTTPS. JSON Web Tokens use the URL-safe variant without padding.
More developer tools
- URL encode and decode: Make text safe for a URL, or turn percent-encoded text back into words.
- JSON formatter: Check JSON, see where it breaks, then format it for reading or minify it.
- JWT decoder: Read a JSON Web Token’s header, claims and times without sending it anywhere.
- UUID generator: Random version 4 UUIDs, one or up to fifty at a time.
- SHA-256 hash: The SHA-256 digest of any text as you type, with SHA-1, SHA-384 and SHA-512 beside it.
- Token generator: Secure random strings for keys, secrets and test data.
- All developer tools on one page
Turn Base64 back into readable text, or encode text as Base64 for a data URL, an email header or an API field. Decoding accepts standard and URL-safe Base64, with or without padding, even when it is wrapped across lines.
How it works
- Choose Encode or Decode — The answer appears as you type or paste.
- Paste the text or the Base64 — Line breaks and missing padding are fine.
- Copy the result — Tick URL-safe to encode with - and _ and no padding.
Examples
- Decode — SGVsbG8sIHdvcmxkIQ== → Hello, world!
- Encode, URL-safe — Hello, world! → SGVsbG8sIHdvcmxkIQ
FAQ
- Is Base64 encryption? — No. It is an encoding anyone can reverse; never use it to hide secrets.
- What is URL-safe Base64? — The same encoding with - and _ in place of + and /, usually without = padding, so it fits in URLs and file names.
- Is my text stored? — No. It runs in your browser; what you paste is never sent anywhere.
