Binary / Hex Converter & Formatter
CodeConvert between binary, hexadecimal, decimal, octal, and ASCII text instantly. Accepts space-separated or continuous input — client-side, no data sent.
Reviewed by the thecalcu.com team · Last updated July 27, 2026
What is a Binary/Hex?
The Binary / Hex Formatter converts values between binary, hexadecimal, decimal, octal, and ASCII text, the five representations of integer byte values used across computing, networking, and data engineering. It accepts space-separated tokens in any of those formats and renders the same values in your chosen output format, with configurable separators.
These conversions come up constantly in technical work: hex dumps from network traffic analysis need to be decoded as ASCII to read protocol messages; binary values from embedded systems need to be shown as hex for memory address comparisons; ASCII text needs to be expressed as decimal byte values for certain encoding or encryption implementations.
Five input formats, five output formats, any combination:
- Hexadecimal (0–9, A–F): the most common format for byte dumps, colour codes, hashes, and binary file inspection
- Binary (0 and 1): machine-level bit patterns; 8 bits per byte
- Decimal (0–255 for byte values): direct integer values
- Octal (0–7): legacy Unix file permissions, older protocol specifications
- ASCII Text: human-readable characters mapped to their code point values
All conversion is client-side. Input is never transmitted or stored. Use the Base64 Formatter for Base64 encoding/decoding, or the URL Encoder / Decoder for percent-encoding.
Why Use a Binary / Hex Formatter?
Developers reading packet captures, debugging binary protocols, or analysing memory dumps regularly need to toggle between hex and ASCII representations. Doing this manually requires arithmetic or a Python/Node.js snippet. A dedicated browser tool does it in one paste.
Developer use case: A backend engineer is debugging a WebSocket message captured with Wireshark. The payload appears as a hex string: 7B 22 74 79 70 65 22 3A. Pasting into the formatter with Hex input and ASCII Text output immediately reveals {"type":, a JSON fragment, confirming the message structure.
Embedded systems use case: A firmware developer needs to verify that binary sensor output (01001000 01100101 01101100) decodes to the expected hex bytes (48 65 6C) before comparing against protocol documentation.
Who Should Use This Formatter?
Backend and systems developers inspecting network traffic, binary file headers, or database BLOB data. Hex-to-ASCII is the most common operation for reading raw protocol data or file metadata.
Security researchers decoding shellcode, payload bytes, or encoded data in captured network packets. Use alongside the Base64 Formatter for payloads that may be multi-encoded.
Students learning computer science who need to visualise how text characters relate to their underlying binary and hexadecimal representations, the foundation of encoding, cryptography, and networking.
Embedded and hardware engineers working with microcontroller register values, CAN bus data, or I2C/SPI transaction logs that appear as hex streams.
What Insights Does the Binary / Hex Formatter Give You?
The output panel shows the converted values in your chosen format and separator style. This lets you immediately read structure in hex-encoded data, consistent patterns of 7B (opening braces), 22 (double quotes), and 7D (closing braces) reveal JSON; a string starting with 89 50 4E 47 is a PNG file header.
When to use each output format:
- ASCII Text, read hex/binary dumps as human-readable characters
- Hexadecimal, compact, readable byte representation (2 chars per byte)
- Binary, see individual bits; useful for bitmask analysis and bitfield inspection
- Decimal, when target systems require decimal byte values (some configuration formats)
- Octal, Unix permission flags (rwxr-xr-x = 755 in octal = 111 101 101 in binary)
How to use this Binary/Hex calculator
- Enter your input in the 'Input' textarea, space-separated tokens, or plain text for ASCII input.
- Select the input format, Hexadecimal (most common), Binary, Decimal, Octal, or ASCII Text.
- Select the output format, ASCII Text to read a hex dump, Hexadecimal to encode binary or text, etc.
- Select the output separator, Space for readability, None for continuous output (hash strings), Comma for CSV, Newline for one value per line.
- Read the output instantly, the conversion applies on every change.
- Click the copy button to copy the converted values.
Show formula & methodology ↓Show less ↑
Formula & Methodology
Parsing algorithm: 1. Split input by whitespace and commas into individual tokens. 2. For each token, strip any0xprefix, then parse usingparseInt(token, base)for the selected base. 3. Return the integer byte value for each token. Rendering algorithm: 1. For ASCII Text output:String.fromCharCode(value)for each integer, joined with no separator. 2. For all other outputs: convert each integer using.toString(base), pad to 2 chars for hex, pad to 8 bits for binary, then join with the chosen separator. Before/after example: | Input | From | To | Output | |---|---|---|---| |48 65 6C 6C 6F| Hex | ASCII |Hello| |Hello| ASCII | Hex |48 65 6C 6C 6F| |Hello| ASCII | Binary |01001000 01100101 01101100 01101100 01101111| |72 101 108| Decimal | Hex |48 65 6C| |01001000| Binary | Decimal |72|
Frequently Asked Questions