ASCII to Hex Converter
Convert ASCII to Hex - code points or UTF-8 bytes, space/comma/0x-prefixed, uppercase or lowercase. Free, client-side, instant, offline.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
Convert text to hexadecimal - choose code points (one hex token per character, emoji-safe) or UTF-8 bytes, with space / comma / 0x-prefix output. All in your browser.
How to Use ASCII to Hex Converter
- Type or paste text into the input - ASCII, Latin characters, CJK, and emoji are all accepted. The output recomputes within 150 ms of your last keystroke.
- Pick an encoding mode. Code points (default) gives one token per visible character -
😀is1F600. UTF-8 bytes flattens multi-byte characters so😀becomesF0 9F 98 80. Extended byte and Strict ASCII enforce 0-255 and 0-127 ranges. - Choose a separator: space for readable, comma for CSV, newline for one-token-per-line, "None" for a continuous hex dump, or JSON array for a
["48","65","6C"]literal ready to paste into code. - Toggle UPPERCASE if you prefer
FFoverff. Hex dumps are traditionally lowercase; C/Java literals prefer uppercase after0x. - Toggle zero-pad to force fixed-width tokens (
01 08 0Finstead of1 8 F). Handy for aligned dumps; on by default because almost all downstream tools expect padded bytes. - Add a per-token prefix like
0x(C, JS, Go),\\x(Python byte literals), or leave empty for plain hex. Combines with all modes. - Check the stats line: mode, character count, token count, min/max hex value, and skipped count. Copy, Download, or press
Ctrl+Enter(⌘+Enteron Mac) to run and copy in one shortcut.
Frequently asked questions
How does the ASCII-to-hex conversion work?
Each character has a numeric code point; the tool renders that number in base 16. In UTF-8 mode the string is first encoded to UTF-8 bytes (via TextEncoder) and every byte becomes a two-character hex token.
Is my text data sent to a server?
No. All conversion runs entirely in your browser. Your text is never uploaded, cached, or tracked, and the tool works offline after the page loads.
Does it support non-ASCII characters like emoji and CJK?
Yes. The default “Code points” mode uses codePointAt so 😀 becomes 1F600 (not two surrogate halves), and 中 becomes 4E2D. For byte-level work pick the UTF-8 mode instead – 😀 then expands to four bytes F0 9F 98 80.
Is the tool free?
Yes, 100% free with no cap on input length or number of encodes. No sign-up, no premium tier, no watermark.
Does it work offline?
Yes. HTML, CSS, and JavaScript are self-contained. Once the page has loaded, you can turn off Wi-Fi and keep encoding – useful on air-gapped machines.
What is the difference between code-point mode and UTF-8 mode?
Code-point mode renders one hex value per visible character, which is what most programming contexts think of as a “character code”. UTF-8 mode renders each byte of the string’s UTF-8 serialisation – useful when you need the exact wire format or are building a uint8_t[] from a string.
Why would I use the 0x prefix or JSON-array separator?
The 0x prefix makes each token a C/JS/Go/Rust-style integer literal, so you can drop them directly into source code. The JSON-array separator wraps the whole output in ["48","69"] – paste-ready into a JSON file or a JS array literal.
Should I use uppercase or lowercase hex?
Hex dumps (Wireshark, xxd, hex editors) traditionally use lowercase. Programming-language literals (C, Go, JSON-like) often prefer uppercase after 0x. The tool defaults to lowercase; flip the toggle when your target tool expects otherwise.
What happens with characters outside the selected range?
They are skipped, not guessed, and the count shows up in the red warning bar and in the stats line. For example in Strict ASCII mode, é is skipped with a count of 1 – switch to Code points or UTF-8 mode to include it.
How do I decode hex back to text?
Use the sibling Hex to ASCII converter. It accepts the same mode set and will round-trip cleanly for any input encoded here, including emoji.
Related Tools
Convert Hex to ASCII →
Decode hexadecimal bytes to ASCII text. Auto-detect separators, handle non-printable bytes four ways, batch…
Add Hex Numbers →
Add Hex Numbers instantly. Free, offline, client-side tool that outputs results in both hex…
Base32 to Hex Converter →
Base32 to Hex Converter - pick separator, case, and prefix. Free, client-side, instant, offline,…
Base58 to Hex Converter →
Decode Bitcoin, Ripple, or Flickr Base58 strings to hex - with separator, case, and…
Base64 to Hex Decoder →
Decode Base64 to hex bytes - URL-safe variant, separator options, uppercase toggle, UTF-8 aware.…
BCD to Hex Converter →
Convert packed BCD to hexadecimal - decimal-value or nibble mode, BigInt precision, COMP-3 sign.…
Convert Decimal to Hex →
Convert decimal numbers to hexadecimal instantly, individually or in bulk. Free, client-side converter with…
Convert Gray Code to Hex →
Decode Gray code (reflected binary) to hex, decimal, or binary. Accepts binary or hex-packed…
Convert Hex to BCD →
Convert hex to Binary Coded Decimal - packed, unpacked, or COMP-3 with sign nibble.…
Convert Hex to Binary →
Convert hex to binary with nibble-accurate bit widths. 5 grouping modes, 0b prefix toggle,…
Convert Hex to Decimal →
Convert hex to decimal with BigInt precision. Explicit bit-width two's complement for signed values,…
Convert Hex to Gray Code →
Convert hex to Gray code (reflected binary) with BigInt precision. Handles 32+ bit values…