Base64 Encode/Decode is an online Base64 encoding/decoding tool that can Base64 encode or decode text content. Base64 is an encoding method that uses 64 printable characters to represent binary data, widely used in data transmission, URL encoding, data storage, and more. All operations run locally in your browser — no data is ever uploaded to any server.
Enter or paste the text content you want to process in the left input area
Click the "Encode" button to convert text to Base64 format, or click the "Decode" button to restore a Base64 string to its original text
The encode/decode result will appear in the right output area. Click the "Copy" button to copy the result, or click "Download" to save it as a text file
data:image/png;base64,...)The tool gives you free daily uses, so everyday text encode/decode needs are covered at zero cost — no payment required to experience the full feature set.
All encoding/decoding runs locally in your browser. Text data is never uploaded to any server, maximizing your data privacy.
Built on the browser's native codec, processing is extremely fast and results display on the right in real time with no server round-trip.
A clean, intuitive interface with no software to install — open the page and use it instantly, with one-click encode, decode, copy, and download.
Uses UTF-8 to process text, so Chinese, Japanese, Korean, and any other Unicode characters are encoded/decoded correctly without mojibake.
Runs in any modern browser, so Windows, macOS, Linux, and mobile browsers all work without worrying about system compatibility.
Base64 divides every 3 bytes (24 bits) of binary data into 4 groups of 6 bits each, mapping each group to one of 64 printable characters. The 64 characters include: uppercase letters A-Z (0-25), lowercase letters a-z (26-51), digits 0-9 (52-61), plus sign + (62), and slash / (63). When data is not a multiple of 3 bytes, the = sign is used for padding.
| Value | Char | Value | Char | Value | Char | Value | Char |
|---|---|---|---|---|---|---|---|
| 0 | A | 16 | Q | 32 | g | 48 | w |
| 1 | B | 17 | R | 33 | h | 49 | x |
| 2 | C | 18 | S | 34 | i | 50 | y |
| 3 | D | 19 | T | 35 | j | 51 | z |
| 4 | E | 20 | U | 36 | k | 52 | 0 |
| 5 | F | 21 | V | 37 | l | 53 | 1 |
| 6 | G | 22 | W | 38 | m | 54 | 2 |
| 7 | H | 23 | X | 39 | n | 55 | 3 |
| 8 | I | 24 | Y | 40 | o | 56 | 4 |
| 9 | J | 25 | Z | 41 | p | 57 | 5 |
| 10 | K | 26 | a | 42 | q | 58 | 6 |
| 11 | L | 27 | b | 43 | r | 59 | 7 |
| 12 | M | 28 | c | 44 | s | 60 | 8 |
| 13 | N | 29 | d | 45 | t | 61 | 9 |
| 14 | O | 30 | e | 46 | u | 62 | + |
| 15 | P | 31 | f | 47 | v | 63 | / |
There are several Base64 variants for different use cases:
Base64 is an encoding method, not an encryption algorithm. Encoding is reversible (can be decoded back), while encryption requires a key. The purpose of Base64 is to represent binary data as printable characters for transmission in text-based protocols — it provides no security, and anyone can decode it.
Yes. Base64 encoding increases data size by approximately 33% (exactly 4/3 times). Since every 3 bytes (24 bits) of original data are encoded into 4 characters (each occupying 1 byte, totaling 4 bytes), the encoded length is about 1.33 times the original length.
Yes. The tool uses UTF-8 encoding to process text, first converting text to a UTF-8 byte sequence before Base64 encoding. It can correctly handle Chinese, Japanese, Korean, and any other Unicode characters.
No. All encoding/decoding operations run entirely in your browser using the native btoa() and atob() APIs. Your data never leaves your device.
Common reasons: ① The input string is not a valid Base64 format (contains illegal characters or incorrect formatting); ② The string contains line breaks or spaces (the tool automatically removes whitespace); ③ The number of Base64 padding = signs is incorrect. Please check if the input is a valid Base64 encoded string.
The tool gives you free daily uses, so everyday text encode/decode needs are covered at zero cost; for higher quotas or more frequent use, a membership unlocks more benefits. Using the basic features requires no registration or login — just open the page and start.
Yes, mobile is supported. The tool runs in a web page, so mobile browsers (iOS Safari, Android Chrome, etc.) can open and use it directly. The layout is responsive, so you can encode and decode anytime, anywhere.
They serve different purposes: URL encoding escapes special characters as %XX so they can be safely transmitted in URLs; Base64 converts binary data into printable characters, commonly used to embed data in text protocols. URL-safe Base64 (replacing + / = with - _) is better suited for putting directly into links.
The equals sign is Base64's padding character. When the original data length is not a multiple of 3 bytes, = is added at the end to fill up to a multiple of 4; it is ignored automatically during decoding and does not affect the restored result.
No. The tool consistently uses UTF-8 to convert text into bytes before encoding. As long as decoding also uses UTF-8 output, Chinese and other characters are restored correctly with no garbling.
This tool targets single-segment text for instant encode/decode. For large volumes, paste and convert segment by segment, or loop locally via a script — all operations run in the browser locally and do not depend on a server.
Yes. Base64 output is pure ASCII text with no invisible characters other than line breaks, making it ideal for storing in databases or writing to config files, effectively avoiding encoding issues caused by binary or special characters.
Online DES/2DES/3DES encryption and decryption tool, supporting all encryption modes and padding methods. Fully processed locally in the browser for security and efficiency.
Online AES encryption and decryption tool, supporting AES-128/192/256, covering all encryption modes and padding methods, secure, efficient, and easy to operate.
Online 3DES encryption/decryption tool, supporting all encryption modes and padding methods, fully processed locally in the browser to ensure data security.
Online RC4 stream cipher encryption/decryption tool, supports multiple key lengths, one-click encryption and decryption, all operations are completed locally in the browser to ensure data security.
Online Rabbit stream cipher encryption/decryption tool, using a high-speed symmetric encryption algorithm, supporting multiple key lengths. All operations are performed locally in the browser to ensure data security.
Online RC2 encryption and decryption tool, supporting ECB/CBC modes, variable key length and effective key bits, all processed locally in the browser to ensure data security.
Online IDEA International Data Encryption Algorithm Tool, supporting multiple encryption modes including ECB/CBC/CFB/OFB/CTR. All operations are performed locally in the browser to ensure data security.
Online Blowfish encryption/decryption tool supporting 128/192/256/448-bit variable keys, ECB/CBC/CFB/OFB modes, and multiple padding methods. All operations are performed locally in the browser to ensure data security.
CAST-128 (CAST5) online encryption and decryption tool, supporting multiple encryption modes such as ECB/CBC/CFB/OFB, flexible padding methods, and output encoding. All operations are performed locally in the browser, ensuring security and efficiency.
Online SM4 National Symmetric Encryption and Decryption Tool, supporting five working modes: ECB/CBC/CFB/OFB/CTR, and multiple padding methods. All operations are performed locally in the browser to ensure data security.
Online RSA asymmetric encryption and decryption tool, supporting key pair generation, public key encryption and private key decryption, private key signing and public key verification. All operations are performed locally in the browser to ensure data security.
Online MD5 hash encryption tool, supporting 16-bit/32-bit output, case switching, and file MD5 verification. All operations are completed locally in the browser, ensuring security and efficiency.
MD2 Encryption Tool: Generate 32-bit MD2 hash values online, supporting uppercase/lowercase output and file verification.
Online SHA-1 hash calculation tool for efficient text encryption and file integrity verification.
Online SHA-256 hash calculation tool for quick text encryption and file integrity verification.
Online SHA-384 hash calculation tool for fast text encryption and file integrity verification.
Online SHA-512 hash calculation tool, supporting text encryption and file integrity verification, quickly generating secure hash values.
Online SM3 National Hash Encryption Tool, supports text hash calculation and file verification, outputs a 256-bit hash value, compliant with GM/T 0004-2012 national standard.
Online URL encoding and decoding tool, supports intelligent encoding and decoding of URL parameters, automatically identifies URL structure, processes only the parameter part, completes entirely in the browser locally, safe and efficient.
Online UTF-8 encoding/decoding tool, supporting conversion between text and UTF-8 hexadecimal bytes. All processing is done locally in the browser, ensuring data security.