Hex converter

Convert a number between bases or convert UTF-8 text and hexadecimal bytes.

Mode
Use 0x for hexadecimal, 0b for binary or 0o for octal input. For a negative number, put − at the start. Maximum: 256 hexadecimal digits.
Example
FF → 11111111 · 1111 1111
Each F is 15, or 1111₂.
Binary: 11111111 Octal: 377 Decimal: 255 Hexadecimal: FF Bit groups: 1111 1111

Conversion rules

Numbers use a sign and a magnitude, not fixed-width two’s complement; fractions convert exactly between binary, octal and hexadecimal and from those bases to decimal, while decimal fractions with a non-terminating expansion in the other bases are rejected without rounding.

Hexadecimal input ignores letter case and output uses capitals; 0x, 0b and 0o must match the input base.

Hexadecimal and binary digits map exactly in groups of 4 bits; input limits are 256 hexadecimal digits, 1024 binary digits, 342 octal digits and 309 decimal digits, counting digits before and after the point but excluding the sign, prefix and point.

Text uses UTF-8 only, up to 1024 bytes; each byte is two hexadecimal digits and bytes are separated by spaces; other encodings, Base64 and encryption are outside this tool.

The examples use public test strings and conversions run in your browser; input state is included after # in a shared URL.

F = 15 = 1111₂ · .8₁₆ = 8/16 = .1₂

Frequently asked questions

Can I convert hexadecimal to decimal here?
Yes. Number mode includes binary, octal, decimal and hexadecimal conversion; a separate decimal converter is not needed.
How are negative numbers represented?
The minus sign applies to the magnitude; there is no fixed bit width or two’s complement interpretation.
How are fractions converted between bases?
Each hexadecimal digit corresponds to 4 bits, including after the point, so A.8 becomes 1010.1 without rounding. Fractions convert exactly between binary, octal and hexadecimal and from those bases to decimal; a decimal fraction is rejected without rounding if its expansion in binary, octal and hexadecimal repeats without ending.
Why are hexadecimal bytes rejected?
Bytes need pairs of hexadecimal digits separated by spaces and must form valid UTF-8; an odd digit count or invalid sequence is rejected instead of replaced.
What are the limits, and where do inputs remain?
Hexadecimal input allows 256 digits, binary input 1024 digits, octal input 342 digits, decimal input 309 digits and text 1024 UTF-8 bytes; digits before and after the point count toward the limit, but the sign, prefix and point do not. The absolute value must not exceed 2^1024 − 1, and each converted result must fit the digit limit for its base even when the input is within its limits. Inputs are included after # in the URL and passed on when shared. Inputs and results are not stored on the server or in browser storage; copied text may remain on the clipboard.

Privacy on this page

Conversions run in your browser. Input state, including the number, base and direction, source text or byte sequence, is included after # in the URL and is passed on when you share it. This fragment is not part of the page request sent to the server. Numbers, bases and directions, source text, byte sequences, conversion results and copied text are not stored by this tool on the server or in browser storage; shared URLs and the clipboard can retain their contents.

To understand how the page is used and to improve the service, this page sends semku’s own usage statistics and automatic error reports. They go only to the dedicated endpoint under semku.com/api/telemetry/v1/. They are not used for advertising or third-party tracking.

The usage statistics include stages of use (such as starting an operation or requesting a copy), the times they occur and fixed identifiers that distinguish the page and feature. They do not include numbers, bases or directions, source text, byte sequences, conversion results or copied text. Inputs are not sent as hashes or as size categories either. The full URL and search terms are not sent.

Operations and sessions are distinguished by randomly generated identifiers. In the browser, these identifiers exist only in temporary memory and are not written to cookies or browser storage. No identification based on cookies or combined device characteristics is used.

Error reports contain the error type, code and time, and, where available, a registered program-source identifier with line and column numbers. The error message text and stack traces are not sent. Usage statistics and error reports also carry the site identifier, the deployment version and a random record identifier. For access records such as IP addresses, browser signals (User-Agent Client Hints), region and language, see the paragraph below.

The feedback form sends the rating you chose and the text you typed in the free-text field when you press the send button. The form also sends a random ID that distinguishes the submission, along with the page, site, deployment version and type of request. There are no fields for your name, email address or phone number, and numbers, bases or directions, source text, byte sequences, conversion results or copied text are not attached automatically. Before sending your text, the widget removes leading and trailing whitespace and, if you selected a rating, adds [+1] or [-1] at the start; it makes no other changes to your text. After receipt, the collector standardizes line endings and removes leading and trailing whitespace. Please do not enter personal data, passwords, authentication keys or payment details.

To improve the service, we record the country and state/province-level region at the time of your visit (an estimate based on the connecting network), which site you came from including the page path, and one display-language setting announced by your browser (for example, en-US). Location is kept to country and region only; no city or precise position is recorded. When you use the service, connection records, including your IP address, are automatically generated and retained to maintain service security and identify abnormal access. Cloudflare is the data processor for this site. Collection of this item is enabled only after this notice is published; we do not collect it retrospectively for use before collection is enabled. Query strings such as search terms are not recorded, and neither is the full list of preferred languages or the raw request headers. Collection of this information is currently disabled and will only be enabled after this notice is published. If we enable collection, we will collect and use signals your browser reports about its type and version, along with an indication of whether automation tools are being used, to identify bots. These browser signals are estimates and do not conclusively identify your browser's type or version or whether automation tools are being used. We do not collect it retrospectively for use before collection is enabled. The raw User-Agent request header is not recorded. These records are per visit only and use no identifier that links one visit to another. Recording starts only with visits after this notice is published and is not applied retroactively to earlier visits. The region and the referring site have been recorded since 2026-09-20; the display language since 2026-09-24. Browser signals are not recorded yet.

Separately, when you visit the site, the hosting provider records your IP address, the time of the request and user-agent information about your browser and device in Cloudflare Pages’ standard access logs.

For details, see the privacy policy.

Conversions run in your browser; the input state follows # in the URL and is included when you share it.