More
More
Base64 Encode & Decode
Encode and decode Base64 text.
Free tools that run in your browser. Nothing you type, open or create is uploaded to NerdBible or anyone else.
Text is encoded as UTF-8 first, so accents, other alphabets and emoji survive the round trip. Decoding accepts standard Base64 and Base64URL, with or without padding and line breaks.
How to use it
- Pick a mode: encode or decode text, turn a file into Base64, or turn Base64 back into a file.
- Paste text or choose a file. Text results update as you type.
- Copy the result or download it.
Questions
Is Base64 encryption?
No. Base64 only rewrites data using 64 safe characters so it can travel through email, JSON or a URL. Anyone can decode it, so never use it to hide a password or a secret.
What is Base64URL?
A variant that uses - and _ instead of + and /, and usually drops the = padding, so the result can sit in a URL or a file name without escaping. JSON Web Tokens use it.
Why does the decoded text look garbled?
The data was probably not text, such as an image or a zip file, or it was text in an older encoding than UTF-8. Use Base64 to file to save the bytes and open them with the right program.
Why is the Base64 bigger than the file?
Every 3 bytes become 4 characters, so Base64 is about a third larger than the original. That is the cost of using only safe characters.
About this tool
What is Base64?
Base64 rewrites any data using 64 safe characters: letters, digits, + and /. That lets binary data such as an image, or text with unusual characters, travel through systems built for plain text, like email, JSON, data URLs and HTTP headers. Every 3 bytes become 4 characters, so encoded data is about a third larger than the original.
Four modes
- Encode text: text is turned into UTF-8 first, so accents, other alphabets and emoji survive the round trip.
- Decode text: accepts standard Base64 and Base64URL, with or without padding and line breaks.
- File to Base64: for embedding an image or font in CSS or JSON.
- Base64 to file: saves decoded bytes as a file you can open.
Base64URL
A variant that uses - and _ instead of + and / and usually drops the = padding, so the result can sit in a URL or a file name. JSON Web Tokens use it.
Not encryption
Anyone can decode Base64 instantly, so it must never be used to hide a password or a secret.
Garbled output?
The data was probably not text, such as an image or a zip file, or it was text in an older encoding. Use Base64 to file and open the result with the right program.
Everything is encoded and decoded in your browser.
Related tools
- Escape, Encode & DecodeEscape and unescape text for JSON, JavaScript, HTML entities, XML, SQL, CSV, regex and URLs.
- JWT Decoder & EncoderRead a JSON Web Token, check an HS256 signature or sign a test token.
- Hash Generator & File ChecksumSHA and MD5 hashes of text or files, HMAC signatures, and checking a download against its published checksum.
- URL ParserSplit a URL into its parts and query parameters.
- HTML Entities List & EncoderEvery named HTML entity with its codes, plus an encoder and decoder.