Encode a short word
- Example input
- Encode mode; Hello with no trailing newline.
- Expected result
- SGVsbG8=
The final equals sign is padding. Decoding this exact value returns Hello. Adding a space or newline to the input changes the encoded bytes.
Encode UTF-8 text as Base64 or decode Base64 back to text in your browser. See examples for plain text and accented characters. Encoding is not encryption.
Base64 represents text bytes using a restricted alphabet. Encoding is reversible and does not protect a secret.
The final equals sign is padding. Decoding this exact value returns Hello. Adding a space or newline to the input changes the encoded bytes.
The accented character uses multiple UTF-8 bytes. This text tool expects decoded bytes to form valid UTF-8; arbitrary binary data may fail text decoding.
Use the text converter for text, not as a general file decoder. Anyone who receives a Base64 string can decode it; use appropriate encryption when confidentiality is required.
The Base64 Converter implements RFC 4648 encoding and decoding to transform arbitrary text and binary data into ASCII-safe string representations using a 64-character alphabet (A-Z, a-z, 0-9, +, /). Base64 encoding groups input bytes into 24-bit chunks, splits each chunk into four 6-bit indices, and maps those indices to the alphabet. This ensures binary data survives transmission through text-only protocols like HTTP headers, email bodies, JSON payloads, and URL parameters without corruption from character encoding mismatches.
The tool handles full UTF-8 multibyte character sequences by first encoding text into byte arrays via TextEncoder before applying Base64 transformation. This prevents data corruption when encoding non-ASCII characters including emoji, CJK ideographs, Arabic script, and accented Latin characters. URL-safe Base64 mode substitutes the + and / characters with - and _ respectively and omits padding = characters, producing strings safe for direct inclusion in URL query parameters without percent-encoding.
Decoding reverses the process: parsing the Base64 string into 6-bit values, reconstructing the original byte sequence, and decoding bytes back to UTF-8 text via TextDecoder. All encoding and decoding operations execute client-side using JavaScript typed array manipulation and the browser btoa/atob functions enhanced with UTF-8 preprocessing for multibyte safety.
Paste plain text to encode into Base64, or enter a Base64 string to decode back to readable text. The engine detects UTF-8 multibyte sequences automatically.
Choose standard Base64 (with + and / characters) or URL-safe Base64 (with - and _ substitutions) depending on your target transport protocol or storage context.
Click encode or decode to process the content. The engine handles UTF-8 byte serialization, 6-bit grouping, alphabet mapping, and padding character insertion automatically.
Retrieve the converted Base64 string or decoded plain text via one-click clipboard copy for immediate use in API payloads, authorization headers, or data URI schemes.
TextEncoder/TextDecoder preprocessing ensures emoji, CJK characters, and extended Unicode survive Base64 round-tripping without mojibake corruption or data loss.
RFC 4648 Section 5 URL-safe encoding replaces + and / with - and _ characters, eliminating the need for percent-encoding when embedding Base64 in URL parameters.
Directly encode username:password credentials for HTTP Basic Authentication Authorization headers following the standard Base64 credential format specification.
All encoding and decoding executes in browser JavaScript using typed arrays. No text content or credentials traverse external networks during conversion.
Base64 makes bytes convenient to transport through text-oriented systems; it does not encrypt them. Its output is generally larger than the original byte sequence. Unicode text also needs a consistent character encoding such as UTF-8, so test accented characters and emoji when exchanging data with another system.
Encode HTTP Basic Authentication credentials, prepare data URI schemes for inline image embedding, and format binary payloads for JSON API transmission using Base64 encoding.
Encode MIME attachments, format email headers containing non-ASCII characters, and prepare inline images for HTML email templates using standard Base64 encoding schemes.
Convert small images to Base64 data URIs for CSS background embedding, reducing HTTP request count. Encode form data for AJAX transmission through text-only channels.
Decode intercepted Base64-encoded tokens, analyze obfuscated payloads, and verify credential encoding formats during penetration testing and security audit assessments.
| Input or option | Reference | What to check |
|---|---|---|
| Base64 | Text representation of bytes | Encoding does not encrypt |
| UTF-8 | Characters represented as bytes | Non-ASCII characters may use multiple bytes |
| Decoded result | Reconstructed bytes interpreted as text | Binary data may not be readable |
Base64 encodes every 3 bytes of input into 4 ASCII characters. Each character represents only 6 bits of information versus 8 bits in a raw byte. This 4/3 ratio means 100 bytes of input produces approximately 133 characters of Base64 output. Padding characters (=) may add 1-2 additional bytes to align the output to a multiple of 4 characters.
Standard Base64 uses + and / as characters 62 and 63 in the alphabet, which have special meaning in URLs (+ becomes space, / is a path separator). URL-safe Base64 (RFC 4648 §5) substitutes - for + and _ for / to avoid conflicts. URL-safe mode also typically omits trailing = padding characters since the decoder can infer missing bytes from string length.
Yes. Base64 is specifically designed to encode arbitrary binary data into ASCII text. Images, PDFs, ZIP archives, and any file type can be represented as Base64 strings for embedding in data URIs, JSON payloads, or XML documents. However, the 33% size increase makes it inefficient for large files compared to binary transmission.
No. Base64 is an encoding scheme, not encryption. It transforms data representation without any secret key or cryptographic algorithm. Anyone can decode a Base64 string back to the original data. Base64 ensures safe transport through text-only channels but provides zero confidentiality. Never use Base64 alone to protect sensitive information.
JavaScript native btoa() operates on Latin-1 characters and throws errors on multibyte Unicode. Our converter uses TextEncoder to first serialize the string into UTF-8 byte arrays, then applies Base64 to those bytes. Decoding reverses this: Base64 to bytes, then TextDecoder to UTF-8 string. This round-trip preserves all Unicode characters including emoji.
An internet connection is required to open tools and refresh a temporary session. Processing stays on your device; the handshake sends a random challenge, not files or text inputs. Libraries, fonts or models may download. Local processing cannot remove risks from an untrusted device or extension.