Base64 Text Encoder
Input
Base64 is a standard way to carry text, including non-ASCII characters, through systems that expect printable ASCII. This browser-only tool encodes UTF-8 text as Base64 or decodes Base64 back to valid UTF-8 text, following RFC 4648 with optional URL-safe alphabet and padding settings. Use a file or binary decoder when the decoded bytes are not text.
How Base64 text encoding works
-
1
Paste your text
UTF-8 is the default interpretation: every character first becomes its UTF-8 byte sequence.
-
2
Pick direction
Encode text-to-Base64 or decode Base64-to-text.
-
3
Choose the variant
Standard (`A-Z a-z 0-9 + /`) or URL-safe (`+` and `/` replaced by `-` and `_`). When encoding, toggle padding (`=`) on or off.
-
4
Copy the result
Use the result where the receiving format expects Base64 or an unpadded Base64URL value. Encoding text does not create or validate a complete JWT or authentication header.
Worked example
Encoding the word café:
- UTF-8 encoding:
63 61 66 C3 A9(5 bytes; theéis two bytes in UTF-8) - Group into 3-byte chunks:
63 61 66 | C3 A9 - Each 3 bytes become 4 Base64 characters:
Y 2 F m | w 6 k = - Final:
Y2Fmw6k=
URL-safe Base64
Standard Base64 uses + and /, which have reserved meanings in URLs and filenames:
+may become a space in form-style query decoding/delimits URL path segments
URL-safe Base64 (RFC 4648 section 5) swaps them for - and _. The = padding remains unless you turn padding off; when a target format requires no padding, disable it explicitly.
Padding
Base64 outputs are grouped into 4-character blocks. If the input length is not a multiple of 3 bytes, the last block is padded with = to fill the 4 characters:
| Input bytes | Output | Padding |
|---|---|---|
| 1 | 4 | == |
| 2 | 4 | = |
| 3 | 4 | (none) |
Some formats, including Base64URL-encoded JWT segments, omit padding. This tool accepts padded and correctly unpadded input.
Common mistakes
- Treating Base64 as encryption. It is not. Anyone can decode Base64; it hides nothing.
- Forgetting UTF-8. Encoding “café” as Latin-1 gives different bytes than UTF-8. Unless you know the receiver’s expectation, stick with UTF-8.
- Pasting with whitespace. RFC 4648 decoders reject characters outside the alphabet by default. Enable this tool’s option, which accepts ASCII spaces, tabs, line breaks and form feeds, only when the referring format, such as MIME, permits them.
Frequently Asked Questions
No. It is an encoding, not encryption. “aGVsbG8=” decodes to “hello” in any Base64 decoder. If you need secrecy, encrypt first and Base64 the ciphertext for transport.
Base64 represents every 3 input bytes as 4 output characters, so the encoded form grows by about 33%. Padding can add up to two characters.
Base64URL uses - and _ where standard Base64 uses + and /. Padding is a separate choice: turn it off if the receiving URL or filename format requires an unpadded value.
Standard Base64 should be percent-encoded as a query value. Base64URL avoids + and /; turn padding off as well when the receiving format does not allow =.
Related Tools
Word Counter
Count words, characters, sentences and paragraphs with reading time, speaking time, keyword density and a Flesch readability score for essays, posts, captions and meta descriptions.
Emoji Kitchen
Try verified Google Emoji Kitchen sticker pairs, download PNGs, and get supported suggestions when a pair is not in the curated set.
Business Name Generator
Generate business name ideas from industry keywords and style choices, then use the checklist to verify domains, registries and trademarks.
Character Counter
Count characters, words, lines, sentences and paragraphs in any text. See totals with and without spaces plus a character breakdown.
Password Generator
Generate strong random passwords with adjustable length, symbols, numbers and mixed case using cryptographic randomness.
Anagram Solver
Paste scrambled letters or a crossword fodder clue and get every valid English word that can be made, sorted by length.