UTF-8 Encoder and Decoder
Convert text to UTF-8 bytes and validate byte sequences.
Encode Unicode text as UTF-8 bytes and convert those bytes to standard or URL-safe Base64, or decode Base64 back to strict UTF-8 text.
Base64 is an encoding, not encryption.
Your text is processed in this browser and is not submitted to UnicodeNow.
Encode Unicode text as UTF-8 bytes and then Base64, or decode standard or URL-safe Base64 bytes back to strict UTF-8 text. Base64 is byte-oriented. Valid Base64 can contain binary data that is not valid UTF-8 text.
Base64 is encoding, not encryption. Anyone with the encoded value can decode it.
Operation
Standard uses + and /; URL-safe uses - and _.
Paste Unicode text for encoding, or Base64 text for decoding. Input remains local to this browser.
Decoded output is interpreted as strict UTF-8 text. Valid Base64 can still contain binary or non-UTF-8 bytes.
Hex output represents the decoded bytes and does not assume a text encoding.
This tool converts Unicode text to Base64 by using the correct text pipeline: Unicode string to UTF-8 bytes to Base64. It also decodes Base64 text back to bytes, then either interprets those bytes as strict UTF-8 text or shows the decoded bytes as hexadecimal. The reverse pipeline is Base64 to bytes to UTF-8 text. Processing runs locally in your browser.
Base64 is byte-oriented. It can represent text, images, compressed files, keys, tokens or arbitrary binary payloads. This page is primarily a text and byte-inspection tool, so invalid UTF-8 is reported separately from invalid Base64 instead of being silently replaced.
Input text:
Hello, café 😀
Standard Base64:
SGVsbG8sIGNhZsOpIPCfmIA=
| Feature | Standard Base64 | URL-safe Base64 |
|---|---|---|
| Character 62 | + | - |
| Character 63 | / | _ |
| Padding | Usually = | Often optional by protocol |
| Common uses | General data, MIME | URLs, filenames, JWT segments |
URL-safe Base64 avoids characters that are awkward in URLs and filenames, but it is not automatically safe for every protocol. You still need to consider the surrounding syntax, separators, quoting rules and whether padding is allowed.
é
Unicode code point: U+00E9
UTF-8 bytes: C3 A9
Base64: w6k=
Direct btoa("é")-style handling is unreliable because btoa() expects byte-like character values, not arbitrary Unicode text. This tool uses TextEncoder before encoding, so emoji, combining marks and non-Latin text are converted through UTF-8 bytes first.
Base64 processes bytes in groups of three and emits four encoded symbols. If the final byte group is short, = padding marks the missing bytes. Valid padding has zero, one or two equals signs at the end. An encoded length of one modulo four is impossible. Some protocols omit padding, so this decoder can infer valid missing padding and report when it did so.
Base64 only changes representation. It does not hide, protect, sign, encrypt, compress or sanitize the data. Anyone with the encoded value can decode it. Do not use Base64 as a security boundary.
Invalid input can come from the wrong alphabet, mixed standard and URL-safe characters, impossible lengths, misplaced padding, too much padding or unexpected punctuation. This tool can ignore only ASCII spaces, tabs, line feeds and carriage returns. It does not silently remove non-breaking spaces, zero-width spaces or other Unicode whitespace because those characters may indicate copied-text corruption.
Valid Base64 may decode to a PNG, PDF, ZIP file or any other byte sequence. Those bytes are not necessarily UTF-8. In UTF-8 text mode, invalid bytes cause a clear error. Hex bytes mode shows the decoded bytes such as 48 65 6C 6C 6F without assuming a character encoding.
SGVsbG8= is plain Base64. data:text/plain;base64,SGVsbG8= is a Data URL with a media type and prefix. The decoder rejects prefixes by default. If you intentionally enable prefix stripping, it accepts only a valid Base64 Data URL pattern and reports the removed media type.
This tool runs in your browser. Your input is not submitted to UnicodeNow. The local runner writes output as textarea text and uses Blob URLs only for downloads.
Base64 is a text representation of binary bytes using a limited ASCII alphabet.
No. Base64 only changes representation and provides no confidentiality.
Standard Base64 uses + and /, while URL-safe Base64 uses - and _.
The equals sign pads the final encoded group when the byte count is not divisible by three.
Some protocols allow omitted padding, but the decoder must infer only valid missing padding.
MIME Base64 often does. This tool can ignore ASCII spaces, tabs, line feeds and carriage returns when enabled.
Base64 represents bytes, and those bytes may be binary data or text in another encoding.
Yes, when emoji are first encoded as UTF-8 bytes.
btoa() expects byte-like character values rather than arbitrary Unicode text.
It can decode URL-safe Base64 text segments, but it does not verify signatures or claims.
This page is primarily for text and byte inspection. It does not provide a full file-decoding workflow.
No. Base64 normally increases size.
No. This tool runs in your browser and does not submit input to UnicodeNow.
Convert text to UTF-8 bytes and validate byte sequences.
Count UTF-8 bytes, code points, grapheme clusters and UTF-16 code units for text.
Decode hexadecimal byte values into UTF-8 text.
Convert UTF-8 text bytes into hexadecimal values.
Decode binary byte groups into UTF-8 text.
Convert UTF-8 text bytes into binary byte groups.
Convert decimal bytes or Unicode code point values to text.
Encode and decode URL components, full URLs and form-style strings.
Inspect each Unicode character, encoding, category, script and normalization form.
Unicode defines characters and code points. UTF-8 encodes those code points as bytes for files, databases, web pages, APIs and network messages.
Learn how Unicode escape syntax works across JavaScript, JSON, Python, PHP, Java, HTML, CSS and URLs.
Choose the right Unicode length unit for UI limits, storage limits, APIs, JavaScript, Python and PHP.