Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
DEC2HEX converts a decimal number into a hexadecimal string. You can optionally specify the number of characters to use, padding with leading zeros. Use it when interfacing with systems that require hex addresses, color codes, or binary protocols.
=DEC2HEX(255,4)=DEC2HEX(255,4)Computed by a real spreadsheet engine on the sample data below.
| Decimal | Hex |
| 10 | =DEC2HEX(10) |
| 255 | =DEC2HEX(255,4) |
| 4096 | =DEC2HEX(4096) |
| 65535 | =DEC2HEX(65535) |
=DEC2HEX(255,4)→00FF
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: