The quick answer
Paste Base64 and get hex; paste hex and get Base64. The converter decodes the input to text, then writes that text's UTF-8 bytes in the other notation: QUJD, the Base64 of ABC, comes back as 414243, and 414243 goes back to QUJD. Both directions run locally in your browser; nothing you paste is uploaded.
Why convert between Base64 and hex
Two notations, same bytes. Hex writes each byte as exactly 2 characters (0-9, a-f), the native format of memory dumps, certificate serials and MAC addresses. Base64 packs every 3 bytes into 4 characters, the native format of text transport, from email attachments to JWT segments. This converter moves between them in either direction, instantly, entirely on your device.
The bridge case is debugging: a payload arrives as Base64 but the tool that inspects it wants hex, or vice versa. A JWT's middle segment decodes to bytes you want to hex-dump; a certificate's hex serial needs to ride in a JSON string. Converting between the two notations never changes the underlying bytes, only the notation, and doing it locally means tokens and keys never leave the tab.
What this converter does, and what it does not
The day-to-day usage could not be simpler: paste data into the input pane, and the converted form appears in the output pane live, with no calculate button and no page reload. Two labeled buttons beneath the panes pick the direction: Base64 → Hex (the default) and Hex → Base64. Close the tab when you are done and everything you entered is gone.
What it does not do is encrypt. Both notations are trivially reversible encodings, and converting a credential between them hides it from nobody. It also does not accept every Base64 dialect: the decoder matches the standard alphabet (+ and /) and raises an error on the URL-safe characters - and _, which is what the URL-Safe Base64 page is for.
Converting in either direction, step by step
Here is the complete workflow, from empty input to a result you can copy and trust.
Load the example, or paste your own data
The Load example link drops SGVsbG8= (the Base64 of Hello) into the input pane, and the output shows 48656c6c6f before you have typed anything. Otherwise paste your own Base64 or hex string.
Pick the direction
The two buttons beneath the panes are labeled Base64 → Hex and Hex → Base64, and the output recomputes the instant you switch. No run button, no page reload.
Watch the note bar
Bad input announces itself instead of producing garbage: a Base64 string containing an invalid character draws an Invalid base64 character note under the output pane.
Copy, download or chain
Copy puts the result on your clipboard; Download writes it as encoded.txt; Use as input pipes the output back into the input pane, and with the direction flipped that is a one-click round-trip test.
Clear when done
Clear empties the input in one click. Because processing is local, there is no history and no server copy: close the tab and everything you typed is gone.
The route: Base64 → bytes → hex
Every conversion passes through text, because that is what both notations carry in practice. Base64 → hex decodes the Base64 characters back to their 6-bit values, re-packs them into bytes, and writes each byte as two hex digits; hex → Base64 is the mirror image, pairs of hex digits becoming bytes and groups of 3 bytes becoming 4 characters. The round-trip is byte-exact whenever the Base64 decodes to valid UTF-8, which covers JWT segments, certificate serials and every debugging case the pair exists for.
The arithmetic with a real payload: QUJD is the Base64 encoding of the text ABC. Decode it and you have 3 bytes; write those bytes in hex and you have 414243, because 65 decimal, the ASCII code for A, is 0x41 in hex and 01000001 in binary. Six hex digits for three bytes, four Base64 characters for three bytes: the two ratios, 2 and 4/3 per byte, are the whole size story.
The one boundary worth knowing: the pipeline decodes bytes as UTF-8 text before re-encoding, so Base64 that decodes to invalid UTF-8 becomes replacement characters instead. The bytes FB EF BE, which encode as ++++ in standard Base64, come back as efbfbdefbfbd (two U+FFFD characters at efbfbd each), not the fbefbe a raw byte-dump would show. Text-bearing payloads never hit this path.
Input
QUJD (Base64) 414243 (hex) SGVsbG8= (Base64)
Output
414243 (hex) QUJD (Base64) 48656c6c6f (hex)
A worked round-trip you can check by hand
Run the full circle yourself with the text ABC. As hex it is 414243; feed that hex to the converter in Hex → Base64 mode and it returns QUJD; feed QUJD back in Base64 → Hex mode and it returns 414243. The same loop with the built-in example: SGVsbG8= is the Base64 of Hello, and its hex is 48656c6c6f, five bytes, ten hex digits, eight Base64 characters. The examples on this page are computed by the same code the tool runs, so what you read here is what the converter does.
Who converts between these two byte notations
Five jobs account for most of the traffic on this page.
- Backend developers: a payload arrives as Base64 and the log line wants hex, or a certificate's serial arrives in hex and the config file wants Base64. One paste in each direction settles what the bytes actually are, without a round-trip through a server-side converter that would see the token.
- Security analysts: malware write-ups quote C2 domains and shellcode as hex, while the same artifacts sit in captured traffic as Base64. Converting locally lets you compare a suspicious string against an IOC list without uploading the sample to a third-party site before you know what you are holding.
- Embedded and firmware developers: hex is the native format of memory dumps, register values and flash dumps, while over-the-air update payloads travel as Base64. Converting between them is a weekly chore, and doing it in a browser tab keeps prototype firmware out of paste bins.
- Students: one byte has several written forms, and 65 decimal, 0x41, the letter A and 01000001 are the same thing. Watching QUJD become 414243 and back is the whole lesson, demonstrated rather than lectured.
- QA engineers: round-trip tests need proof that a pipeline preserved bytes exactly: encode a fixture to Base64, store it as hex, convert back, and diff. Six hex digits per three bytes makes any drift visible at a glance, which is why this converter doubles as a verification instrument.
Your strings never leave the browser
Nothing sensitive leaves your device here, because the strings people convert are exactly the ones that should not travel: tokens, keys, certificate material. The conversion is local computation with no request in it, and the site's identity lookups, the pages that do phone home, say so on their own pages.
Compared with xxd, od and Python one-liners
You have options for byte-inspection work. Here is how the mainstream alternatives stack up, including where they legitimately win.
| Alternative | Why people pick this page instead |
|---|---|
| Command-line tools (xxd, od, base64) | The classics, exact and fast, at the cost of remembering flags and letting the string into shell history |
| Python one-liners (bytes.fromhex) | What scripts use; the tab is for a paste-and-see answer with zero setup |
| Online converters | Identical math, but the token or payload lands in someone else's request log |
For one-off conversions, the paste-and-see answer with no setup and no transmission wins; for repeat work, the command line belongs in a script, and that script does not need a browser.
Field notes and gotchas
The distilled usage advice for this page is one habit and two failure patterns.
- Validate on arrival: the Load example link drops SGVsbG8= in and 48656c6c6f out, and the round-trip in both directions is the fastest engine check on the page.
When something behaves unexpectedly, the causes are almost always one of these two:
- Decoding fails on a pasted Base64 string: check for URL-safe characters, - and _ instead of + and /. The converter here skips whitespace but uses the standard alphabet only, and the URL-Safe Base64 page handles the other dialect.
- Hex input with an odd number of digits: every byte is exactly 2 hex digits, so an odd count means a digit was lost in copying. The converter drops a trailing lone digit silently (414 decodes as the single byte 41), so count the digits yourself rather than trusting the output.
The more-hex-than-expected surprise is a ratio, not a fault, and the FAQ below carries the arithmetic. If the converter misbehaves on your setup in some other way, the contact page reaches the desk directly.
Frequently asked questions
These are the questions people actually search about the Base64 to hex pair, answered directly. If yours is missing, the contact page takes feature and question requests.
Is the Base64 to Hex converter free to use?
Yes, and free means free: no signup, no email gate and no usage meter. The whole computation is local JavaScript, which is why it can stay free; there is no per-use backend to charge for. It behaves the same on the first visit and the five-hundredth.
Is Base64 to Hex conversion exact or lossy?
Exact, always, for text-bearing payloads. Both notations describe the same bytes, hex as 2 characters per byte and Base64 as 4 characters per 3, and the conversion decodes and re-encodes with no rounding or estimation anywhere. The output hex is lowercase and unspaced (ABC comes back as 414243); if a downstream wants uppercase or spaces, that is a find-and-replace after copying. One boundary: the pipeline decodes bytes as UTF-8 text first, so Base64 that decodes to invalid UTF-8 becomes replacement characters rather than surviving byte-for-byte.
Can text encoded in Base64 be reversed without a key?
Yes, and that is by design. Base64 and hex are encodings, not encryption: trivially reversible, no key involved, meant to make binary data text-safe rather than secret. Never treat either form as a way to hide a credential; anyone holding the string recovers the bytes in seconds.
Why does my Base64 string convert to more hex than I expected?
Count the ratios, not the intuition: every 3 bytes are 4 Base64 characters and 6 hex characters, so hex output runs 1.5× the Base64 length for the same bytes. A 100-character Base64 string is roughly 75 bytes, which is 150 hex digits. The bytes are identical; only the notation density differs.
Can I use the Base64 to Hex converter offline?
Yes: once the page is cached, conversion runs without a connection, since the computation happens on your device. Byte arithmetic needs no network, which is also why nothing you paste can leak.
Is Base64 to Hex safe for pasting API keys and tokens?
Safe by architecture: conversion is pure local computation, nothing you type is transmitted, and the page keeps working offline once loaded. The standing caution is habit: secrets belong in as few clipboards and tabs as possible, and encoding one does not make it private.
What is the difference between hex and Base64 output for the same bytes?
Density and alignment. Hex is byte-aligned, every 2 characters exactly 1 byte, which is why hexdumps, MAC addresses and certificate serials use it, but it inflates data by 2×. Base64 is denser at 1.33× overhead but not byte-aligned. Same bytes, different trade: hex for inspection, Base64 for transport.
What to reach for next
The tools below pair with this one because people chain them in real workflows, not for keyword decoration.
- Base64 Encoder/Decoder: plain Base64 work without the hex step.
- URL-Safe Base64 Encoder/Decoder: the JWT-ready alphabet that this page's decoder rejects.
- String to Hex: text straight to hex when Base64 is not in the chain.
- Hex to String: hex straight back to text.
- Base32 Encoder: the case-insensitive sibling for human-handled strings.
Sources and further reading
Two notations, one set of bytes, both directions a keystroke away. The method is on this page, the round-trip examples are real computations, and your data stays on your device. The pages below document the two notations and the byte-level view underneath them.
Sources and further reading
- RFC 4648: Base encodings (IETF)(datatracker.ietf.org)
- MDN Web Docs: hexadecimal numbers in JavaScript(developer.mozilla.org)
- Wikipedia: ASCII printable characters table(en.wikipedia.org)
- MDN Web Docs: ArrayBuffer and binary data(developer.mozilla.org)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.