Base64 Encoder/Decoder
Codifica e decodifica Base64 con supporto per testo, file e immagini. Variante URL-safe disponibile.
Converti
Come utilizzare Base64 Encoder/Decoder
Choose a method
Select "Encode" to convert text to Base64 or select "Decode" to decode a Base64 string into readable text.
Select variant
Use the "Standard (RFC 4648)" variant for general use, or "URL-Safe (RFC 4648 SS5)" if the result must be incorporated into URLs or file names.
Insert text
Enter or paste the text to encode (or the Base64 string to decode) into the top text area. The method is automatically detected.
Start Conversion
Click the "Encode" or "Decode" button to process the input. The result will appear in the output area with statistics on dimensions.
Copy or download the result
Use the "Copy" button to copy output into notes, or use the "File to Base64" section in the sidebar to encode complete files and images.
Suggerimenti
- Use the button "Swap" to automatically invert input and output and change mode with a single click.
- For images, copy the full "Data URI" to include them directly in HTML or CSS without external files.
- Save history saves the last 10 conversions to localStorage, so you can quickly find previous operations.
Domande frequenti
What is base64 encoding and what does it serve?
Base64 is a coding scheme that converts binary data into an ASCII text string. It's used to transmit binary data (images, files) over channels that only support text, such as emails (MIME), JSON, XML, or HTML data URIs.
What is the difference between standard Base64 and URL-safe?
The Base64 standard uses the characters "+" and "/" which have special meanings in URLs. The URL-safe variant replaces "+" with "-" and "/" with "_" and removes the padding "=" to make the string safe for use in URLs, cookies, and file names without additional encoding.
Why does the file size increase with Base64?
Base64 encodes every 3 bytes of data into 4 ASCII characters, increasing size by about 33%. This overhead is the price paid for compatibility with systems that only handle text.
How can I encode an image in Base64 to use it in CSS or HTML?
Load the image file through the "File to Base64" section in the sidebar. The tool will automatically generate a complete Data URI (e.g. data:image/png;base64,...) ready for use as an image src attribute or as a background-image value in CSS.
Are my data secure when using this tool?
Yes, all processing occurs locally in your browser. No data is sent to external servers. The tool works even offline once the page has loaded.
Want to learn more?
Read our in-depth articles on related topics: