tool hub Tool Hub

Decimal To Hex

Decimal To Hex — runs in your browser. Inputs are not stored.

Runs in your browser No sign-up Free to use


Base conversion (2 / 8 / 10 / 16)

Enter values, then press Calculate.

Integers only. Prefix negative numbers with -.

How to use

  1. Choose input base and output base from 2, 8, 10, and 16. The default is decimal → hexadecimal.
  2. Enter an integer in Value. The default example is 255; changing the value or bases updates the result immediately.
  3. Press Convert again if needed, or use Swap input/output bases to reverse direction.
  4. A decimal reference is shown with the result line. Hex output uses uppercase A–F.
  5. Negative numbers can start with -. Reset returns to 255 and 10→16.
  6. Use this converter for an integer channel value, not a whole #RRGGBB string. Prefix negatives with a minus.

Key concepts

Base conversion is the same integer written in binary, octal, decimal, or hexadecimal. Use it for subnet masks, permission bits, memory addresses, and color-channel integers. This screen handles integers only, not real fractions, and strips spaces from input. Math uses JavaScript parseInt and toString; hex output is uppercase A–F. Editing the value field updates the result and decimal reference immediately.

JavaScript Number can lose integer precision beyond about 253, so it is a poor fit for crypto keys or very large IDs. Digits that do not belong in the input base (2 in binary, 8 in octal) show an error. This is not a tool that turns text into byte hex. For color codes, enter a channel integer (0–255), not the whole string.

Example

Default decimal 255 is FF in hex, 11111111 in binary, and 377 in octal. Swap bases and that hex becomes the input, returning decimal 255. Hex 1A with input 16 and output 10 is 26; -1A keeps the minus sign. Editing the value field updates the result and decimal reference at once, so you can compare bases quickly. Reset returns to 255 and 10→16.

Related: Text ↔ hex · Text ↔ binary · RGB HEX converter

Frequently asked questions

How do I convert decimal to hexadecimal?

Set input base 10 and output base 16, then enter an integer in the value field. Uppercase hex appears immediately. The default example 255 is <code>FF</code>.

Can I convert binary, octal, and hex on the same screen?

Yes. Pair 2, 8, 10, and 16 freely as input and output. Swap bases to reverse direction.

Are decimal points allowed?

Integers only. A decimal point may fail to parse or get truncated—do not use one. Fractional bases are not handled.

Are hex A–F uppercase or lowercase?

Input accepts both <code>ff</code> and <code>FF</code>; the result line is uppercase. Cross-check with the decimal reference line.

Are very large integers exact?

Yes within the integers JavaScript Number can represent safely (about 2<sup>53</sup>). Crypto keys and IDs larger than 64-bit can be off.

Are converted values stored on a server?

No. Each change is recalculated only in the browser and is not logged.

Decimal To Hex cover image
Your input is not sent to the server and disappears when you close the page.

Last reviewed: 2026-09-04