Skip to content

Encoding converters

Hex to Base64

Convert hex to Base64 online: paste hexadecimal (with or without spaces, 0x prefixes or line breaks) and get clean Base64 out. Also decodes xxd dumps. Free and 100% client-side.

100% private · everything runs in your browser

Paste hex in almost any shape — continuous, space-separated, 0x-prefixed, comma-separated, \\xNN escapes, even a full xxd dump with offsets and ASCII columns — and get clean Base64 out. The parser strips everything that is not a hex digit pair and tells you precisely when something is off.

Input

How to use

Hex to Base64, step by step

  1. 01

    Paste your hex dump in any common style — copied from a debugger, Wireshark, xxd or a code file. Non-hex decoration is stripped automatically.

  2. 02

    Check the result card: byte count, what the bytes look like as a file, and the size. Odd-length or non-hex input produces a precise error.

  3. 03

    Copy the Base64, or download it — and preview inline when the bytes happen to be an image, PDF or other recognizable file.

FAQ

Frequently asked questions

Practically all of them: continuous (a1b2c3), space- or comma-separated, 0x-prefixed (C arrays), \xNN escapes (regex and Python strings), colons (MAC-address style), and complete xxd/hexdump output including offset columns and ASCII gutters.

Most tools only accept bare hex digits. xxd output mixes offsets (00000000:), hex columns and an ASCII gutter — all of which are poison to a naive parser. This one recognizes the format and strips the decoration before decoding.

Hex encodes one byte as exactly two digits. An odd count means a digit was lost in copy-paste — the error tells you the total length so you can find the truncation point.

No — upper and lower case digits are both accepted, even mixed. The Base64 output follows the standard alphabet, which is itself case-sensitive.

Yes — the decoded bytes are run through file-type detection (60+ signatures), so you see whether your hex is a PNG, a PDF, a ZIP or something unknown, with dimensions or page counts where they exist.

Yes: Base64 to Hex converts in the other direction and emits every hex style, including xxd dumps.

Related tools

esc

Tools

Pages

↑↓ navigate↵ open⌘K

Keyboard shortcuts

Same shortcuts everywhere — ⌘ on macOS, Ctrl on Windows and Linux.