Convert from:

Format Reference

ASCII / Text

ASCII maps 128 characters (0–127) to 7-bit codes. Extended ASCII covers 0–255 (1 byte). Modern text uses Unicode with UTF-8 encoding, which maps each code point to 1–4 bytes. Use Character Encoding to control how characters become bytes.

Hexadecimal (Base-16)

Hex uses digits 0–9 and A–F. Each hex digit represents 4 bits; two digits represent one byte (0x00–0xFF). Widely used in memory addresses, colour codes, binary file inspection, and low-level protocol debugging.

Binary (Base-2)

Binary represents values using only 0 and 1. Each digit is one bit; 8 bits form one byte. The Bit Width setting controls whether output is padded to 8-bit bytes, split into 4-bit nibbles, grouped into 16-bit words, or left unpadded.

Decimal (Base-10)

Standard base-10 numbers. Each byte value ranges from 0 to 255. Useful when working with IP addresses, MIDI note numbers, colour component values (RGB), or any protocol that specifies byte values as decimal integers.

Octal (Base-8)

Octal uses digits 0–7. Three octal digits represent one byte (000–377). Historically common in Unix file permissions (chmod 755) and legacy computing. Each octal digit maps to exactly 3 binary bits.

Base64

Base64 encodes binary data as 64 printable ASCII characters. Every 3 bytes become 4 Base64 characters — a 33% size overhead. Commonly used in data URIs, email attachments (MIME), JSON payloads, and HTTP Basic Auth headers.

When do developers need base conversion?

Base conversion is a daily task for developers working with networking, cryptography, embedded systems, file formats, and data encoding. Hex is the lingua franca of raw bytes: debuggers, packet analysers, and hex editors all display data in base-16. Binary is essential for understanding bitmasks, flags, and bitwise operations. Decimal appears in IP addresses and configuration values. Octal remains relevant for Unix permissions. Base64 is the standard way to embed binary data in text-based formats like JSON or HTML.

Character encoding and byte conversion

When converting text to binary representations, the character encoding determines how each character maps to bytes. UTF-8 is the safest choice for general-purpose use: it handles all Unicode characters and is the default on the web. ISO-8859-1 (Latin-1) encodes Western European characters in exactly one byte each, which can be useful when working with legacy systems. ASCII (7-bit) covers only the first 128 code points; characters above 127 are replaced with ?. Always use the same encoding when converting to and from a byte representation.

Delimiters and formatting

The Output Delimiter controls how individual byte values are separated in the output. Space-separated hex (48 65 6c 6c 6f) is the most common format for human-readable output. Comma-separated values can be pasted directly into array literals. Newline-separated output works well for processing with command-line tools like awk or grep. The Input Delimiter setting tells the converter how to parse incoming hex, binary, decimal, or octal values — use "packed" for streams without separators.

Common Use Cases

  • Hex editing: Convert raw binary protocol bytes to human-readable hex strings for inspection in packet analysers, debuggers, and log files.
  • Bitmask analysis: Convert a decimal or hex value to binary to understand which individual bits are set in a flags field or hardware register.
  • Cryptography: Display key material, hashes (MD5, SHA-256), and IVs in hex for comparison against reference values.
  • Embedded systems: Convert between decimal sensor readings and hex register values when writing firmware or interpreting data sheets.
  • Data encoding: Convert text to Base64 after understanding the underlying bytes in binary or hex — shows the full picture of what is being encoded.

Frequently Asked Questions

How do I convert text to hexadecimal?
Select 'ASCII / Text' as the source format, enter your text, and the tool converts each character to its UTF-8 byte values in hexadecimal. For example, 'A' becomes 41 and 'Hello' becomes 48 65 6C 6C 6F.
What is the difference between hex and binary?
Both represent the same underlying byte values in different bases. Hexadecimal uses digits 0–9 and A–F — two hex digits per byte. Binary uses only 0 and 1 — eight bits per byte. Hex is more compact; binary shows the raw bit pattern explicitly.
Why does the same text produce different hex output with different encodings?
The character encoding determines how text characters map to bytes. UTF-8 encodes accented and non-Latin characters as 2–4 bytes each. ISO-8859-1 encodes Western European characters as 1 byte each. ASCII replaces characters above 127 with a ? placeholder.
What is the 'packed' input delimiter?
When 'packed' is selected, the tool reads the input as a continuous byte stream with no separators — for example, 48656C6C6F for the hex bytes of 'Hello'. Use space, comma, or newline delimiters for human-readable byte lists.

Privacy & Security

All conversions run in your browser. No data is sent to any server at any time.