Encoding Converter
Convert text between plain text, Base64, URL encoding, hexadecimal and 8-bit binary in real time, byte for byte in UTF-8
Source Data & Conversion Settings
How to use this tool
- Choose Encode Text or Decode, then pick the Input Format: plain text, Base64, URL-encoded, hexadecimal or binary.
- Type or paste the data into the input field; all other formats update as you type.
- Adjust the hex and binary delimiters, and tick the URL-safe option if you need Base64 with - and _ instead of + and /.
- Use the Copy button next to the format you need, or copy all formats at once.
Worked example
The default text Hello, World! is 13 characters and 13 bytes in UTF-8. Its Base64 form is SGVsbG8sIFdvcmxkIQ==, its URL-encoded form is Hello%2C%20World!, and its hex form is 48 65 6c 6c 6f 2c 20 57 6f 72 6c 64 21. A non-ASCII letter changes the byte count: Héllo has 5 characters but 6 bytes, because é takes two bytes (c3 a9), giving Base64 SMOpbGxv. If you decode bytes that are not valid UTF-8, the text column shows replacement characters, so the text may not match the original bytes. Base64 is an encoding for transport, not encryption.
Methodology
Encoding formats translate bytes into text that survives transport and storage. Worked example: the 5-character string Héllo is 6 bytes in UTF-8 because é takes two (c3 a9): hex 48 c3 a9 6c 6c 6f, Base64 SMOpbGxv, URL form H%C3%A9llo. Every other representation is derived from those bytes, whichever format you type in.
How many bytes does one symbol cost?
Each row is typed as plain text with default settings (space-separated hex, standard Base64). The count column shows the tool's character counter, then the UTF-8 byte count.
| Text | Characters → bytes | Hex | Base64 |
|---|---|---|---|
| Hi | 2 → 2 | 48 69 | SGk= |
| ñ | 1 → 2 | c3 b1 | w7E= |
| € | 1 → 3 | e2 82 ac | 4oKs |
| 日本 | 2 → 6 | e6 97 a5 e6 9c ac | 5pel5pys |
| 😀 | 2 → 4 | f0 9f 98 80 | 8J+YgA== |
How to read it: the Base64 text grows with the bytes, not with the characters. The counter uses UTF-16 units, so the emoji shows as 2 characters although it is one symbol; the byte count is the number that matters for limits. In the URL column of the tool these become %C3%B1, %E2%82%AC, %E6%97%A5%E6%9C%AC and %F0%9F%98%80. Tick the URL-safe option and the emoji's 8J+YgA== turns into 8J-YgA. Base64 is a way to carry bytes as text, not encryption.
Frequently asked questions
What is the difference between standard Base64 and URL-Safe Base64? ▼
Standard Base64 (RFC 4648 §4) uses “+” and “/” with “=” padding. In URLs, query strings, and HTTP headers, “+” and “/” can cause routing or decoding collisions. URL-Safe Base64 (RFC 4648 §5) substitutes “+” with “-” (hyphen), “/” with “_” (underscore), and typically omits trailing “=” padding characters.
Why does a 13-character string with non-ASCII symbols produce more than 13 bytes? ▼
Under UTF-8 variable-length encoding, standard ASCII characters (A-Z, 0-9, punctuation) require 1 byte each. Accented characters, umlauts, and Latin-extended characters consume 2 bytes, while CJK ideographs and emojis take 3 to 4 bytes per code point.
Is my data sent to any remote server when converting? ▼
The conversion code runs in your browser using the built-in TextEncoder, TextDecoder, atob and btoa functions, and the page does not upload what you type. Even so, avoid pasting live production secrets into any website you do not control. Also remember that Base64, URL encoding, hex and binary are reversible encodings, not encryption: anyone who sees the output can decode it, so encoding a password or token does not protect it. If the input is not valid for the selected format (for example, hex with an odd number of digits, or binary that is not a multiple of 8 bits), the tool shows an error instead of guessing.