Codificatore e decodificatore Base64
Codifica testo UTF-8 in Base64 o decodificalo. Base64 è una codifica, non una cifratura.
Dati
Suggerimento: premi Ctrl + Enter per eseguire
Impostazioni salvate
Per ora la guida dettagliata qui sotto è disponibile solo in inglese.
Informazioni su questo strumento
Base64 represents bytes using 64 safe characters, so binary data or non-ASCII text can travel through systems that expect plain text: email attachments, data URLs, HTTP basic authentication headers and many APIs. This tool encodes text as UTF-8 and then Base64, or decodes Base64 back to readable text.
Base64 is not encryption. Anyone can decode it, so never treat a Base64 string as hidden or secure.
Come si usa
- Paste the text to encode, or the Base64 string to decode.
- Choose encode or decode.
- Run the tool.
- Copy the result. For images, use image to Base64 instead.
Come funziona il calcolo
Encoding converts the text to UTF-8 bytes and then to standard Base64 with padding. Decoding removes whitespace, checks the Base64 format and decodes the bytes as strict UTF-8, refusing invalid byte sequences.
UTF-8 ⇄ Base64Esempio pratico
Encoding "Café €5" produces Q2Fmw6kg4oKsNQ==. The accented é and the euro sign take two and three bytes in UTF-8, which is why the result is longer than the seven visible characters suggest, and the two = signs pad it to a multiple of four. Decoding Q2Fmw6kg4oKsNQ== returns Café €5.
Esempio di input e risultato
Ciao → Q2lhbw==
Limiti
- Text only; binary output is refused when decoding.
- Standard alphabet with padding.
- Up to 100,000 characters.
Ultimo aggiornamento:
Domande frequenti
Is Base64 secure?
No. It is an encoding that anyone can reverse instantly.
Does it support Base64URL (with - and _)?
It uses standard Base64 with + and /. For Base64URL, replace - with + and _ with /, and add = padding before decoding.
Why does decoding fail on some strings?
The string may not be valid Base64, or it may encode binary data (such as an image) that is not UTF-8 text.
Risoluzione dei problemi
Decoding gives an error for a JWT segment.
JWTs use Base64URL without padding. Use the JWT decoder.
A data URL will not decode.
Remove the "data:...;base64," prefix and decode only the part after the comma.
Line breaks in the Base64 cause problems.
Whitespace is removed automatically before decoding; check for other characters such as quotes.
Privacy & Gratuito
I miei dati vengono salvati?
I tuoi dati restano in questa scheda. Non riceviamo i tuoi file, i testi incollati né i valori dei calcoli.
Questo strumento è gratuito?
Sì. Non servono registrazione né pagamento.
Vedi anche
Passi successivi utili
Formattatore e validatore JSON
Valida, formatta o minimizza JSON in locale. I dati non validi non vengono mai inviati a un server.
Sviluppo e SEOConvertitore da CSV a JSON
Converti intestazioni e record CSV in JSON, con delimitatori tra virgolette e a capo.
Sviluppo e SEOConvertitore da JSON a CSV
Converti un array piatto di oggetti in CSV. Le stringhe simili a formule ricevono un prefisso protettivo per i fogli di calcolo.
Sviluppo e SEO