Hex Decoder & Encoder

Decode hex to text and encode text to hex. Paste hex with or without spaces, 0x or \x prefixes; UTF-8 text comes back correctly.

Tags: encoder hex encode/decode

🚀 177,247 total conversions (138 this month)

Practice Python with coding challenges

Solve hands-on problems right in this editor: run the sample tests, submit, and get an AI code review.

All Python challenges
Easy

Rectangle Perimeter

Compute the perimeter of a rectangle from its sides.

You'll learn ArithmeticReturn values
BeginnerLearning-pathVariables
Easy

Days in a Month

Return how many days a month has, including leap years.

You'll learn Calendar rulesHelper functions
BeginnerConditionsFunctionsLearning-path
Easy

Dot Product of Two Vectors

Multiply two vectors element by element and add the results: the core operation of every neuron.

You'll learn VectorsDot product
Neural networksaimachine learning
Easy

Distance Between Points

Compute the straight-line distance between two points.

You'll learn Pythagorean theoremSquare roots
BeginnerFunctionsLearning-pathmath
Easy

Average of Three

Average three whole numbers.

You'll learn ArithmeticDivision
BeginnerLearning-pathVariables
Easy

To-Do List

Keep a list of tasks: add them, mark them done, remove them and report what is still pending.

You'll learn Typed collectionsRecords
BeginnerSimulationStrings
Easy

Prime Number Check

Decide whether a number is prime.

You'll learn DivisibilityLoop optimization
BeginnerLoopsNumbersStudent-beginner
Hard

Word Break

Decide whether text can be split into dictionary words.

You'll learn Prefix DPString segmentation
AdvancedDynamic-programmingHackathonStrings
Easy

Count Pairs With a Sum

Count pairs of positions whose values add up to a target.

You'll learn Pairs of indexesAvoiding double counts
ArraysBeginnerLearning-pathNested-loops
Easy

Missing Number

Find the one number missing from 0..n.

You'll learn Arithmetic seriesSum difference trick
ArraysBeginnerStudent-beginnermath
Medium

K-th Smallest Element

Find the k-th smallest value without fully sorting.

You'll learn QuickselectPartitioning
AdvancedCompetitive-programmingSorting
Easy

Min and Max Together

Find the smallest and largest value in one pass.

You'll learn Single passMultiple return values
ArraysBeginnerFunctionsLearning-path

Introduction

This online Hexadecimal encoder tool makes it easy to convert strings into hexadecimal format and back again. Whether you're working with text or numbers, this tool simplifies the process and saves you time.

How to Use This Tool

  1. Paste your string directly into the editor or type it in.
  2. Click the Encode or Decode button to convert your string to or from hexadecimal format.
  3. After encoding or decoding, you can:
    • Download the result.
    • Save or share it with others using a short link.
    • Sign in with Google or GitHub to save your results to your account for later use.

What is Hexadecimal?

Hexadecimal (or hex) is a base-16 numbering system that simplifies the representation of binary data. It uses 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Each hex digit represents a 4-bit binary sequence, making it much easier to write and read binary numbers.

For example:

  • Binary to Hex: 11010100 → D4
  • Hex to Binary: FFFF3 → 11111111111111110011

Why Use Hexadecimal?

Hexadecimal is commonly used in computing and digital systems because it is more compact and readable than binary. It’s often used for memory addresses, color codes, and representing data in ASCII or Unicode character sets.

For more details, check out this helpful guide.

Examples

Before encoded

      
Hello, World!
      
    

After encoded

      
48656c6c6f2c20576f726c6421
      
    

Decode hex to text: formats it reads

Paste hex the way you found it. The decoder removes spaces, commas, colons and 0x, \x or % prefixes, then turns every two digits into one byte.

Hex you pasteText you get
48656c6c6fHello
48 65 6c 6c 6fHello
0x48 0x65 0x6c 0x6c 0x6fHello
\x48\x65\x6c\x6c\x6fHello
48:65:6c:6c:6fHello
c3 a9 74 c3 a9été
f0 9f 98 80😀

Bytes are read as UTF-8, so accented letters, Cyrillic, Chinese, Japanese, Korean and emoji decode correctly.

Is hex a cipher?

Puzzles and CTFs often call it a "hex cipher", but hex is an encoding, not encryption: each pair of digits is one byte, and anyone can read it back with a decoder like this one. To hide data, use real encryption; to check that data has not changed, use a hash such as SHA-256.

How to decode hex by hand

Split the hex into pairs. Each pair is a number from 0 to 255: the first digit counts sixteens and the second counts ones (a = 10 to f = 15). Look the number up in the ASCII table to get the letter.

48 → 4 × 16 + 8 = 72 → "H"
65 → 6 × 16 + 5 = 101 → "e"
6c → 6 × 16 + 12 = 108 → "l"

Have Base64 instead? Convert Base64 to hex