Encode text as UTF-8
ASCII-range characters use the same one-byte values in UTF-8. Other Unicode scalar values use multibyte sequences, so “한” becomes ED 95 9C and “😀” becomes F0 9F 98 80.
Hex integers · Hex bytes · Strict UTF-8
Convert an exact hexadecimal integer to decimal, binary, and octal, or switch to byte mode to encode UTF-8 text and inspect a hex byte sequence. Keep numeric value, byte order, width, and text decoding as explicit choices.
integer 0x41 → 65
byte 41 → A
Same digits, different contractSelect Number or UTF-8 Bytes
Choose number or bytes
Use integer mode for one whole-number value and byte mode for two-hex-digit octets or UTF-8 text. The interface shows the bounded limit and accepted formatting for the selected workflow.
Loading the hex converter…
Enable JavaScript to convert, format, and copy values. The integer, byte, UTF-8, and endianness guidance remains readable below.
Base 16 or ordered octets
Hexadecimal uses sixteen digit values: 0 through 9 and A through F. As an integer, 01AF and 1AF represent the same unsigned value. The leading zero records presentation or field width, not another quantity.
A byte sequence assigns structure to pairs of digits. 01 AF is two bytes in a specific order, and removing 01 removes a byte. Byte mode therefore checks that every octet has exactly two hex digits after supported separators and prefixes are parsed. It does not invent a leading or trailing nibble when the input has an odd digit count.
The distinction becomes critical when interpreting text. The integer C3A9 is decimal 50089. The byte sequence C3 A9 is the well-formed UTF-8 encoding of “é.” Both descriptions are true, but only the selected contract says which result is useful.
If the input is a single numeric value and you primarily need signed width, padding, or binary grouping, use the Binary Converter. Hex byte mode is for ordered octets and UTF-8, not a substitute for a file-format parser or arbitrary binary decoder.
One value in four bases
In positional notation, hexadecimal 2F3 is 2×16² + 15×16¹ + 3×16⁰ = 755 in decimal. Its binary representation can be obtained directly by expanding each hex digit into four bits: 2 → 0010, F → 1111, and 3 → 0011. Leading zeroes can then be retained for a 12-bit field or removed for the minimal unsigned notation.
Integer conversion remains exact for accepted input rather than routing through floating point. A minus sign is an ordinary mathematical negative; a two's-complement interpretation additionally requires a bit width. Keep the source value, width, and signedness visible when reproducing a debugger, protocol, or language result.
Hexadecimal letter case and a 0x prefix are formatting choices. They do not change the value. A receiving grammar may require uppercase, lowercase, a prefix, no prefix, or a fixed number of digits, so copy the format required by that grammar rather than assuming one universal canonical spelling.
Follow worked division, multiplication, and direct bit-grouping examples for binary, octal, decimal, and hexadecimal.
Read the manual conversion guide →Bytes first, characters second
ASCII-range characters use the same one-byte values in UTF-8. Other Unicode scalar values use multibyte sequences, so “한” becomes ED 95 9C and “😀” becomes F0 9F 98 80.
Normalize only the supported prefixes and separators shown by the interface. Reject an odd number of digits or a non-hex character so byte boundaries never shift silently.
A malformed, truncated, overlong, surrogate, or out-of-range UTF-8 sequence must not become plausible-looking text. Keep the original hex visible and report the invalid byte location.
Text bytes are decoded in their given sequence. Reversing them is not a text repair strategy and usually turns valid UTF-8 into different or invalid data.
Understand ASCII codes, Unicode code points, and UTF-8 bytes →
Syntax is not semantics
0x1234Hex integerA language-style prefix labels base 16; the value is decimal 4660.12 34Two bytesAn ordered sequence with byte values 0x12 then 0x34.\x12\x34Byte escape notationAccept only when that explicit prefix style is enabled by the interface.34 12Reversed bytesIt can serialize the same 16-bit integer in little-endian form, but only when width and endianness are defined.Local and bounded
Integer parsing, byte formatting, UTF-8 encoding, and strict decoding happen in the current browser tab. No conversion API receives the value, and the page does not try to identify a pasted signature, key, file header, memory region, or protocol field. The bounded limit displayed in the interface protects interactive rendering.
Hexadecimal is a representation, not encryption or redaction. Anyone with the text can recover the bytes. Remove credentials and private payloads before copying output into a ticket, chat, issue, or prompt. Device software such as extensions and clipboard history remains outside the page's local-processing boundary.
For normative byte-to-text behavior, consult the WHATWG Encoding Standard's UTF-8 definition and the current Unicode Standard. A byte preview does not validate the surrounding application format.
When the source is a sequence of zeroes and ones that should become UTF-8 text, preserve 8-bit byte boundaries and use strict decoding.
Open the Binary Translator →Questions answered
A hex integer is one mathematical value written in base 16, so leading zeroes do not change its unsigned value. Hex bytes are an ordered sequence of octets, where every two hex digits form one byte and order, width, and leading zeroes can be essential.
It can mean either, depending on the contract. In integer mode, hexadecimal 41 is decimal 65. In byte mode, the byte 41 can decode to the character A because ASCII U+0041 has the same one-byte value in UTF-8.
Hex byte mode accepts the explicit formats shown in the interface and normalizes supported separators or prefixes without changing byte order. It rejects stray characters, incomplete prefixes, and an odd final hex digit instead of guessing a missing nibble.
Strict UTF-8 decoding stops with a diagnostic. The tool does not silently replace malformed byte sequences with the Unicode replacement character, because doing so would hide that the original bytes cannot be recovered from the displayed text.
Endianness applies when a fixed-width integer is serialized as an ordered byte sequence. An abstract integer does not have byte order. Record the width and whether bytes are big-endian or little-endian before reversing or interpreting them.
No. Integer conversion and UTF-8 byte processing run in the current browser tab without sending the value to a conversion API. The bounded input limit shown in the interface protects responsiveness; clipboard tools and browser extensions remain separate boundaries.