Hack the Hydra

Binary, hex, decimal and octal converter

Type one number per line, for example 255, 0xFF, 0b1010 or 0o17. Each line shows the same value in decimal, hexadecimal, octal and binary, with binary grouped in blocks of four bits.

🔒 Private by design: the conversion runs in this browser tab. Nothing is uploaded.

Binary, hex, decimal and octal converter is a free online tool by Hack the Hydra. Convert numbers between binary, hexadecimal, decimal and octal. Prefixes 0x, 0b and 0o are detected, negative and very large numbers are exact. One number per line, free and private.

100% freeNo upload: runs in your browserNo sign-up
Binary, hex, decimal and octal converter: the tool with a sample file converted

How the input base is detected

With "Detect", 0x means hexadecimal, 0b binary and 0o octal. A number made only of digits 0-9 is read as decimal, and one containing the letters a-f (such as ff) as hexadecimal. If a value like 1010 is meant as binary, choose "Binary" as the input base instead of relying on detection.

Exact for any size

The conversion uses arbitrary-precision integers, so 64-bit values such as 18446744073709551615 (0xFFFFFFFFFFFFFFFF) stay exact, unlike many calculators that round above 2^53. Underscores and spaces inside a number are ignored, so 1111_0000 and FF FF are accepted.

Negative numbers

A minus sign is kept in front of every result, for example -42 is -0x2A. This is the signed value, not the two's complement bit pattern a CPU would store; for a 32-bit two's complement of a negative number, add 2^32 (4294967296) first.

Example

Three numbers written in different bases, detected from their prefix.

Input

255
0xFF
0b1010

Output

255  ->  dec 255 | hex 0xFF | oct 0o377 | bin 1111 1111
0xFF  ->  dec 255 | hex 0xFF | oct 0o377 | bin 1111 1111
0b1010  ->  dec 10 | hex 0xA | oct 0o12 | bin 1010

How to use

  1. Type or paste your text in the box above.
  2. The result updates as you type; change the options to switch mode.
  3. Copy the result or download it.

FAQ

How do I convert hex to decimal?

Type the hex value with or without 0x, for example 0xFF or ff. The decimal value (255) is shown first on the result line.

Why is binary shown in groups of four?

Each group of four bits is exactly one hexadecimal digit, which makes binary easier to read and to compare with the hex value.

Does it handle fractions?

No, only whole numbers (integers).

Is anything uploaded?

No. Everything is computed in your browser.

More free converters

PDF to Markdown converterOCR PDF: scanned PDF to textImage to text (OCR)Word (DOCX) to Markdown converterExcel & CSV to Markdown tablesHTML to Markdown converterPowerPoint (PPTX) to Markdown converterJSON to Markdown tablePDF to text converterExcel to JSON converterMarkdown to HTML converterMerge PDF filesSplit PDF: extract pagesRotate PDFJPG to PDF converterPDF to JPG converterImage converter: PNG, JPG, WebPCompress image: JPG and WebPQR code generatorWord counterCase converterJSON formatter and validatorBase64 encode and decodeURL encoder and decoderUUID v4 generatorStrong password generatorLorem ipsum generatorJSON to CSV converterRemove duplicate linesUnix timestamp converterJSON to YAML converterText diff checkerImage resizerPercentage calculatorAge calculatorHash generator (SHA-256, SHA-1, SHA-512)Color converter: HEX, RGB, HSLDays between dates calculatorYAML to JSON converterUnit converterJWT decoderRoman numeral converterRegex testerCron expression explainerPDF to Markdown for ChatGPTPDF to Markdown for ClaudePDF to Markdown for RAG pipelinesPDF to Markdown for ObsidianPDF to Notion (via Markdown)Screenshot to textFrench OCR: image to textCSV to Markdown tableGoogle Docs to MarkdownJPG / JPEG to text (OCR)PNG to text (OCR)CSV to JSON converterPNG to JPG converterJPG to PNG converterWebP to PNG converter