Press Ctrl + D to bookmark Base64 Encoder/Decoder.
Open your browser menu (⋮ or the share icon) and tap Bookmark or Add to Home Screen.
Feedback on Base64 Encoder/Decoder
Base64 Encoder & Decoder
Encode or decode text and files as you type. Detects the direction, handles URL-safe Base64, data URIs, images and PDFs — plus Base32, Base58, Ascii85 and hex.
Hashes of the decoded data (MD5, SHA-256)
The decoded text is valid JSON This looks like a JSON Web Token (JWT)
- Type
- Dimensions
- File size
- Base64 size
Make it smaller first
Inlining images over ~10 KB usually slows pages down. Shrink it above, or serve it as a normal file.
The same bytes in other encodings
Base32
Only capital letters and 2–7, so it survives case-insensitive systems. Used for 2FA (TOTP) secret keys and onion addresses.
Base58
Drops look-alike characters (0, O, I, l) and symbols, so it is safe to read aloud or double-click. Used for Bitcoin and Solana addresses and IPFS hashes.
Ascii85 and hex
Ascii85 packs 4 bytes into 5 characters (25% overhead, against 33% for Base64) and appears in PDF and PostScript. Hex is two characters per byte, the easiest to read.
Standard vs URL-safe
Standard Base64 uses + and /. URL-safe Base64 (RFC 4648 §5) swaps them for - and _ and usually drops the = padding. JWTs and many APIs use it. The decoder reads both.
Data URIs
A data URI puts a file inside a link: data:image/png;base64,iVBOR…. Paste one here to see and download the file, or use the File tab to make one for HTML or CSS.
Not encryption
Anyone can decode Base64. To protect data, hash it with the Hash Generator or sign it with the HMAC Generator. For links, use the URL Encoder.
About the Base64 Encoder/Decoder
Base64 turns any data into plain text using 64 safe characters (A–Z, a–z, 0–9, + and /). It is used to send binary data in email, JSON, data URIs, HTTP headers, and JWTs. This tool encodes and decodes text with full UTF-8 support, turns files and images into Base64 or data URIs, and decodes Base64 back into the original file.
How to use it
- 1 Paste text or Base64 into the input. Auto mode picks encode or decode for you.
- 2 Turn on URL-safe or line wrapping if the place you paste into needs it.
- 3 Copy or download the result. Decoded images and PDFs show a preview and a download button.
- 4 To encode a file or image, open the File tab and drop it in to get Base64, a data URI, or an HTML/CSS snippet.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
Why does Base64 output end with = signs?
Base64 works on groups of 3 bytes. When the input length is not a multiple of 3, one or two = characters are added as padding. URL-safe Base64 often leaves them out, and this decoder accepts input with or without them.
What is the difference between Base64 and URL-safe Base64?
URL-safe Base64 (RFC 4648 section 5) replaces + with - and / with _, so the result can go into a URL, filename, or cookie without escaping. JWTs use URL-safe Base64 without padding.
How much bigger does Base64 make data?
Base64 output is about 33% larger than the original, because every 3 bytes become 4 characters. Line wrapping adds a little more.
How do I convert an image to Base64?
Open the File tab and drop the image in, or paste it with Ctrl+V. You get the raw Base64, a data URI, and ready-to-paste HTML <img>, CSS background, and Markdown snippets. Use "Make it smaller first" to resize it or turn it into WebP, so the data URI stays small.
How do I decode Base32, Base58 or hex?
Open the Base32 · Base58 · Hex tab and choose Decode. The tool guesses the encoding, or you can pick it. Choose Encode text to see your text in Base64, Base64URL, Base32, Base58, Ascii85 and hex at once.
How do I turn Base64 back into a file?
Paste the Base64 or data URI into the input. The tool recognises PNG, JPEG, GIF, WebP, SVG, PDF, ZIP, fonts and more, shows a preview for images, and gives you a download button with the right file extension.
Why do I get “Invalid character”?
Base64 can only contain letters, digits, + / (or - _) and = at the end. The error shows the exact position; click “Show me” to highlight it. Spaces and line breaks are ignored automatically.
Is my data uploaded?
No. Encoding and decoding happen in your browser with JavaScript. Text and files never leave your device.