S
SoSimple.tools
Developer & Design Utilities

Encoding Converter

Convert text between plain text, Base64, URL encoding, hexadecimal and 8-bit binary in real time, byte for byte in UTF-8

Runs in your browser: what you enter stays on your device

Source Data & Conversion Settings

13 characters 13 bytes (UTF-8)
Generate URL-Safe Base64 (- and _ instead of + and /)
Converted Output
Plain Text (UTF-8)
Hello, World!
Base64 Representation
SGVsbG8sIFdvcmxkIQ==
URL Encoded Format
Hello%2C%20World!
Hexadecimal Bytes
48 65 6c 6c 6f 2c 20 57 6f 72 6c 64 21
Binary Bits (8-bit)
01001000 01100101 01101100 01101100 01101111 00101100 00100000 01010111 01101111 01110010 01101100 01100100 00100001
Converted to all formats
Share this tool

How to use this tool

  1. Choose Encode Text or Decode, then pick the Input Format: plain text, Base64, URL-encoded, hexadecimal or binary.
  2. Type or paste the data into the input field; all other formats update as you type.
  3. Adjust the hex and binary delimiters, and tick the URL-safe option if you need Base64 with - and _ instead of + and /.
  4. 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.

RFC 4648 Base64 & RFC 3986 URL Encoding: Base64 maps each 3-byte block (24 bits) onto four characters of a 64-character alphabet; when the input length is not a multiple of 3, one or two = padding characters complete the last block (Hi becomes SGk=). Percent-encoding, as produced by encodeURIComponent, writes each unsafe byte as %HH, so a space is %20 rather than +. The URL-safe option swaps + and / for - and _ and drops the padding.
UTF-8 Multibyte Encoding & Hex/Binary Output: Text is converted to 1 to 4 bytes per code point with the browser's TextEncoder (UTF-8). Hex shows each byte as two digits (0-f), and binary as eight bits. Decoding goes the other way: hex input accepts spaces, colons, commas and 0x prefixes, and byte sequences that are not valid UTF-8 are displayed with the replacement character, which is why the text column can differ from the original bytes.

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.

TextCharacters → bytesHexBase64
Hi2 → 248 69SGk=
ñ1 → 2c3 b1w7E=
€1 → 3e2 82 ac4oKs
日本2 → 6e6 97 a5 e6 9c ac5pel5pys
😀2 → 4f0 9f 98 808J+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.

Related tools

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.