Calculator
What the Hex Converter does
Hex Converter: converts Status, Decimal and Binary from Number and From base. Example: number FF and from base Hex gives status Converted.
From Number and From base, this tool derives Status, Decimal and Binary. You can nudge a single number and watch the effect straight away.
Most people who open the Hex Converter are people inspecting an API response. Most of these tasks are one-liners in a terminal, but not when you are away from one.
Nothing is uploaded: useful when the text you are inspecting contains keys or customer records.
The method, a field-by-field reference and a worked example built from the defaults are all on this page.
What do the Hex Converter fields mean?
The Hex Converter uses 2 inputs. Pre-filled inputs double as documentation: each one shows what a reasonable value looks like.
| Field | What to enter | Default |
|---|---|---|
| Number | required | FF |
| From base | choose from Decimal, Binary, Octal or Hex | Hex |
How does the Hex Converter work?
Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same conversion.
Range checks come first, so the formula only ever sees values it can handle.
Worked example
These are the values the Hex Converter loads by default, and the result it produces from them. This is the worked example the page starts from, reproduced here so you can check the arithmetic.
| Number | FF |
|---|---|
| From base | Hex |
| Status | Converted |
|---|---|
| Decimal | 255 |
| Binary | 11111111 |
| Octal | 377 |
| Hex | FF |
| All bases | dec 255 bin 11111111 oct 377 hex FF |
Base 16
Hexadecimal exists because it maps perfectly onto binary, one hex digit is exactly four bits, while being far shorter to read and write.
| Digits | 0 to 9, then A-F | A = 10 … F = 15 |
|---|---|---|
| Place values | … 4096, 256, 16, 1 | powers of 16 |
| Example | 2F₁₆ | 2 × 16 + 15 = 47₁₀ |
| One hex digit | = 4 binary digits | F₁₆ = 1111₂ |
Worth knowing
- Colour codes such as #2563EB are three hex byte pairs: red, green, blue, each 0 to 255.
- Memory addresses, hashes and byte dumps are conventionally shown in hex for the same compactness reason.
- Prefixes vary by language: 0x in C and JavaScript, # for colours, and sometimes a trailing h in assembly.
How to use it
- Fill in Number.
- Pick a value for From base: the options are Decimal, Binary, Octal or Hex.
- Live output means you can search for a target value by nudging an input up and down.
- The panel reports Status, Decimal, Binary, Octal, Hex and All bases.
- Copy Link puts the current inputs in the URL, so bookmarking it brings the same numbers back.
What this tool does not do
- Output follows the common convention for this format; a specific toolchain may have its own house style.
- Processing happens in your browser, so extremely large inputs are bounded by available memory.
- Assumptions built into the method are stated above, but they are still assumptions.
Frequently asked questions
The form asks for Number and From base. Every box already holds a working value, which makes it easy to isolate the effect of a single variable.
With the values loaded when the page opens, status comes out as Converted. The figure is derived from the inputs above, so it updates whenever they do.
Nothing leaves your machine. The only network traffic is loading the page itself.
No. There is no account, no usage cap and no trial period. The site is funded by advertising rather than by charging for the tools.
Full double precision is used throughout; only the displayed figure is shortened.