Skip to content
HandyBrowserTools

Hex ↔ String Converter

Convert UTF-8 text to a hex byte string and back. Handy for reading revert reasons, bytes32 values and calldata fragments. The 0x prefix is optional in both directions.

Private by default: processing stays on your device

Example

Input

Hello world

Output

0x48656c6c6f20776f726c64
Share this page X LinkedIn Reddit

These buttons share the page link, not your input.

Frequently asked questions

Why do I see an odd-length error when decoding?

Every byte is exactly two hex digits, so a valid hex string always has an even number of digits. An odd length means a digit was dropped somewhere, often a stripped leading zero.

Does it handle emoji and non-English text?

Yes. Text is encoded as UTF-8 before conversion, so multi-byte characters like emoji, accents and CJK scripts round-trip exactly.

How is this different from Base64?

Both represent bytes as text. Hex uses two characters per byte (larger but human-scannable and the convention on EVM chains); Base64 is more compact and common on the web. Use the Base64 tool for the latter.

Is anything sent to a server?

No. Conversion uses the browser's built-in TextEncoder and TextDecoder, so your data never leaves your device.

Number Base Converter

Free online number base converter. Convert between binary, octal, decimal, hex and any base 2-36: exact for huge numbers, 100% in your browser.

Keccak-256 Hash

Compute Keccak-256 hashes and Solidity function selectors online. Free and 100% client-side; the hash used by Ethereum, computed in your browser.

EVM Unit Converter

Convert between wei, gwei and ether with exact BigInt precision. Free, instant and 100% client-side, made for gas math without floating-point errors.

Base64 Encode / Decode

Free online Base64 encoder and decoder. Unicode-safe, supports URL-safe Base64, and runs 100% in your browser. Nothing is ever uploaded.