- Esecutori
-
Impara
Impara Python Esempi eseguibili, NumPy, pandas e altro Impara l'IA / Machine LearningReti neurali, ML e LLM da zero Impara C e C++ Puntatori, memoria, STL e C++ moderno Impara C#Fondamenti, OOP, LINQ, async ed esercizi .NET Impara MatplotlibGrafici a linee, barre, dispersione e torta con visualizzatori Impara RustOwnership, trait, gestione degli errori e thread Impara GoSlice, interfacce, goroutine e canali Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++ Programmazione per bambini Impara a programmare giocando!
- QuizNuovo
- SfideNuovo
- Per docentiNuovo
- Aggiornamenti
- Offrimi un caffè
Decodificatore ed encoder Hex
Incolla hex in qualsiasi formato e ottieni subito il testo, oppure converti il testo in hex. Non sai cos'è una stringa hex? L'IA la spiega e decodifica il Base64, il gzip o lo XOR al suo interno.
🚀 177,388 conversioni totali (279 questo mese)
Ispettore di byte
| Dimensione | |
|---|---|
| Decimale | |
| Little-endian | |
| Con segno | |
| Binario | |
| Ottale | |
| UUID | |
| Colore | |
| Base64 |
Dump hex
Esercitati in Python con le sfide di codice
Risolvi problemi pratici direttamente in questo editor: esegui i test di esempio, invia la soluzione e ricevi una revisione AI del codice.
Introduzione
Questo strumento online di codifica esadecimale rende facile convertire stringhe in formato esadecimale e viceversa. Che tu stia lavorando con testo o numeri, questo strumento semplifica il processo e ti fa risparmiare tempo.
Come Usare Questo Strumento
- Incolla la tua stringa direttamente nell'editor o digitala.
- Fai clic sul pulsante Codifica o Decodifica per convertire la tua stringa da o in formato esadecimale.
-
Dopo la codifica o la decodifica, puoi:
- Scaricare il risultato.
- Salvare o condividerlo con altri utilizzando un link breve.
- Accedere con Google o GitHub per salvare i tuoi risultati nel tuo account per un uso successivo.
Cos'è l'Esadecimale?
L'esadecimale (o hex) è un sistema di numerazione a base 16 che semplifica la rappresentazione dei dati binari. Utilizza 16 simboli: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Ogni cifra esadecimale rappresenta una sequenza binaria di 4 bit, rendendo molto più facile scrivere e leggere i numeri binari.
Ad esempio:
- Da Binario a Hex:
11010100→D4 - Da Hex a Binario:
FFFF3→11111111111111110011
Perché Usare l'Esadecimale?
L'esadecimale è comunemente usato nell'informatica e nei sistemi digitali perché è più compatto e leggibile rispetto al binario. È spesso utilizzato per indirizzi di memoria, codici colore e rappresentazione di dati nei set di caratteri ASCII o Unicode.
Per ulteriori dettagli, consulta questa guida utile.
Esempi
Prima della codifica
Hello, World!
Dopo la codifica
48656c6c6f2c20576f726c6421
Decodificare hex in testo: formati supportati
Incolla l'hex così come l'hai trovato. Il decoder toglie spazi, virgole, due punti e i prefissi 0x, \x o %, poi trasforma ogni coppia di cifre in un byte.
| Hex incollato | Testo ottenuto |
|---|---|
48656c6c6f | Hello |
48 65 6c 6c 6f | Hello |
0x48 0x65 0x6c 0x6c 0x6f | Hello |
\x48\x65\x6c\x6c\x6f | Hello |
48:65:6c:6c:6f | Hello |
c3 a9 74 c3 a9 | été |
f0 9f 98 80 | 😀 |
I byte vengono letti come UTF-8, quindi accenti, cirillico, cinese, giapponese, coreano ed emoji si decodificano correttamente.
L'hex è un cifrario?
Enigmi e CTF lo chiamano spesso "cifrario hex", ma l'hex è una codifica, non una cifratura: ogni coppia di cifre è un byte e chiunque può rileggerla con un decoder come questo. Per nascondere dati usa una vera cifratura; per verificare che non siano cambiati, un hash come SHA-256.
Come decodificare l'hex a mano
Dividi l'hex in coppie. Ogni coppia è un numero da 0 a 255: la prima cifra conta i sedici e la seconda le unità (a = 10 fino a f = 15). Cerca il numero nella tabella ASCII per ottenere la lettera.
48 → 4 × 16 + 8 = 72 → "H"
65 → 6 × 16 + 5 = 101 → "e"
6c → 6 × 16 + 12 = 108 → "l"
Hex to ASCII table
Printable ASCII characters by hex value: row is the first digit, column the second. 41 is "A", 61 is "a", 20 is a space.
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | ␠ |
! |
" |
# |
$ |
% |
& |
' |
( |
) |
* |
+ |
, |
- |
. |
/ |
| 3 | 0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
: |
; |
< |
= |
> |
? |
| 4 | @ |
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
| 5 | P |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z |
[ |
\ |
] |
^ |
_ |
| 6 | ` |
a |
b |
c |
d |
e |
f |
g |
h |
i |
j |
k |
l |
m |
n |
o |
| 7 | p |
q |
r |
s |
t |
u |
v |
w |
x |
y |
z |
{ |
| |
} |
~ |
DEL |
Decode hex in code
The same conversion in common languages (UTF-8 text):
# Python
bytes.fromhex("48656c6c6f").decode("utf-8") # 'Hello'
"Hello".encode().hex() # '48656c6c6f'
// JavaScript (Node.js)
Buffer.from("48656c6c6f", "hex").toString("utf8") // 'Hello'
Buffer.from("Hello").toString("hex") // '48656c6c6f'
// Go
b, _ := hex.DecodeString("48656c6c6f") // string(b) == "Hello"
// PHP
hex2bin("48656c6c6f"); // 'Hello'
// C#
Encoding.UTF8.GetString(Convert.FromHexString("48656c6c6f"));
# Bash
echo 48656c6c6f | xxd -r -p # Hello
Hex decoder FAQ
How do I decode hex to text?
Paste the hex into the right box. It turns into text on the left as you type, in any format: 48656c6c6f, 48 65 6c 6c 6f, 0x48 0x65, \x48\x65, 48:65 or a hex dump from xxd. Type text on the left to get its hex.
Why does the decoded text show strange characters?
The bytes are not text in the selected encoding. Try UTF-16 or Latin-1 in "Text encoding". If it still looks like noise, the hex is binary data such as a hash, a key or a file: the byte inspector shows what it probably is, and Explain with AI can tell you more.
What does 0x mean in hex?
0x marks a hexadecimal number in C, Java, JavaScript, Python and most other languages, so 0x41 is 65 in decimal, the letter "A". The decoder removes 0x, \x and % prefixes for you.
How do I convert hex to decimal?
Paste the hex and look at the byte inspector: it shows the number in decimal (big-endian and little-endian), signed, binary and octal. For example FF is 255, and 01 00 is 256 in big-endian or 1 in little-endian.
What is the difference between hex and Base64?
Both write bytes as text. Hex uses two characters per byte, so it doubles the size but is easy to read. Base64 uses four characters for every three bytes, about 33% bigger, which is why it is used in emails, data URLs and JSON. If you paste Base64 here, the page offers to convert it.
Can I decode a hex dump or a whole file?
Yes. Paste output from xxd or hexdump -C and the offsets and text columns are ignored. Use "Open file" to see any file as hex, and "Download bytes" to save decoded hex as a file: PNG, JPEG, PDF, ZIP and other types are detected from their first bytes.
What does Explain with AI do?
It tells you what an unknown hex string probably is: a hash, a UUID, a file header, a network packet or text that is encoded again (Base64, gzip, XOR, ROT13). When more decoding steps are needed, your browser runs them and shows the result, so you see the real decoded data, not a guess.
Is my data sent to a server?
No. Decoding, encoding and the byte inspector run in your browser. The hex is only sent when you press Explain with AI, and then only to answer that question.