HEX to Base64
Convert hexadecimal strings to Base64 encoding.
Convert hexadecimal bytes to Base64. Paste hex with or without spaces, colons or 0x prefixes, and get standard Base64 with padding, or tick URL-safe for the - and _ variant without padding used in JWTs and URLs. Common for hashes, keys and binary data that need to travel as compact text.
Need the reverse? Base64 to HEX
Common use cases
- Turn a hex hash or key into Base64
- Prepare binary data for a JSON field or a URL
- Convert values between tools that expect different encodings
How to use
- Paste the hex.
- Tick URL-safe if needed.
- Copy the Base64.
FAQ
Why is Base64 shorter than hex?
Base64 packs 6 bits into each character, hex only 4, so Base64 is a third shorter.
What is URL-safe Base64?
It replaces + and / with - and _ and drops the = padding, so the result can sit in a URL or a JWT without escaping.
Related tools
- Base64 to HEXConvert Base64 strings to hexadecimal format.
- Binary to HEXConvert binary strings to hexadecimal format.
- HEX to BinaryConvert hexadecimal strings to binary format.
- JWT Signer DemoCreate signed JSON Web Tokens for testing: write the claims, pick HS256, HS384 or HS512, add an expiry, and…
- OTP GeneratorGenerate one-time passwords for authentication.
- NanoID GeneratorGenerate compact, URL-friendly unique IDs.