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.
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.
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.
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