Base64 encoding

Base64 Encoding/Decoding (Base64 Conversion Tool)

You can encode text into Base64 format or decode Base64 strings back to their original UTF-8 text. This is useful for verifying values in APIs, settings, emails, and JSON.

Translation
Waiting for input
Enter text or a Base64 string and click "Convert."

Output

What is Base64 Encoding/Decoding?

Base64 Encode/Decode is a tool for converting plain text into a Base64-encoded string and converting a Base64-encoded string back into its original text.Base64 is a method of representing data using only a limited set of characters, such as alphanumeric characters, plus signs, slashes, and equal signs. It is commonly used in email, HTTP, JSON, configuration files, and API integrations. It is sometimes used to safely embed binary data or strings containing Japanese characters into environments where handling them directly is difficult.

With this tool, you can paste a string into the input field and select "Encode" to generate a Base64 string as UTF-8 text. Conversely, selecting "Decode" will parse the Base64 string and restore it to the original UTF-8 text.Since it processes multibyte characters such as Japanese, emojis, and symbols as UTF-8 using the browser’s TextEncoder and TextDecoder, it can be used not only for simple alphanumeric characters but also for verifying strings used in actual applications.

Base64 is not encryption. Although it appears to be a random string of characters, anyone can decode it to read the original content. Therefore, encoding passwords, API keys, access tokens, personal information, and other sensitive data using Base64 does not ensure their security. Please understand that Base64 is an encoding method used to alter the representation of characters for storage or transmission purposes, and do not use it to hide confidential information. It is important to combine HTTPS, proper authentication, encryption, and access controls as needed.

You can copy the conversion results and download them as a text file if needed.This tool can be used to verify values used in API Authorization headers, validate Basic authentication strings, check the contents of Base64 values contained in JSON, verify Base64 strings output to logs, and create test data. Since the conversion process occurs within the browser, there is no form submission that sends the input string to the server for standard conversion operations. However, please be cautious when using shared devices, browser extensions, screen sharing, and clipboard history.

  • You can encode text as UTF-8 using Base64.
  • You can decode Base64 strings into UTF-8 text.
  • It also supports strings containing multibyte characters such as Japanese, symbols, and emojis.
  • You can copy the translation results to the clipboard or save them as a text file.

How to Use Base64 Encoding/Decoding

First, paste the string you want to convert into the "Input" field. You can enter regular text, parts of JSON, configuration values, Base64 strings received via API, and more. Next, in the "Conversion Mode" section, select "Encode" to convert text to Base64, or "Decode" to convert Base64 back to the original text. Finally, click the "Convert" button, and the converted string will appear in the output field below.

If you want to use the output results elsewhere, click "Copy Results." If you want to save them as a file, use "Download as TXT." Clicking "Switch Input and Mode" transfers the current output results to the input field and switches between encoding and decoding modes. This is useful when you want to immediately decode the encoded results to check if they revert to their original state, or when you want to re-encode the decoded results.

When decoding, entering invalid strings as Base64 or data that cannot be restored as UTF-8 text will result in an error. While line breaks and spaces within Base64 strings are removed during processing, this tool does not support the restoration of URL-safe Base64 formats using "-" or "_", nor does it support the restoration of binary files such as images. Please use this tool for the purpose of verifying text data.

  1. Paste text or a Base64 string into the input field.
  2. Select "Encode" to convert text to Base64, and "Decode" to convert Base64 back to text.
  3. Click the "Convert" button to view the output.
  4. If necessary, use "Copy Results" or "Download as TXT" to save them to your destination.

Important notes when using

  • Base64 is not encryption. Since the original content can be read after decoding, it cannot be used to protect sensitive information.
  • This tool is designed for converting text to Base64. Please use a dedicated tool for converting large binary files such as images and PDFs.
  • Even if the data to be decoded is correctly encoded in Base64, it may not be recoverable if it is not UTF-8 text.
  • Note that the notation may vary depending on the use case, such as URL-safe Base64 or unpadded Base64. Please check the specifications of the intended destination as needed.

Frequently Asked Questions

What is Base64?

Base64 is an encoding method that represents data using only alphanumeric characters and certain symbols. It is used to represent data in environments with character restrictions, such as email, web APIs, JSON, and configuration files.

What is Base64 encoding?

Base64 encoding is the process of converting plain text or data into a Base64-encoded string. This tool treats the input text as UTF-8 and converts it into a Base64 string.

What is Base64 decoding?

Base64 decoding is the process of converting a Base64-encoded string back to its original data. This tool restores and displays Base64 strings as UTF-8 text.

Is Base64 encryption?

No. Base64 is not encryption; it is a form of encoding that changes the representation of data. Since anyone can decode it, please do not use it to hide passwords or API keys.

Can you convert Japanese text to Base64?

Yes. Multibyte characters, such as Japanese, are converted to Base64 as UTF-8. They are restored as UTF-8 text during decoding.

Can emojis and symbols be converted as well?

In most cases, this can be converted. Since input strings are processed as UTF-8, the system supports text containing emojis, symbols, and full-width characters.

Will the entered text be sent to the server?

This tool's conversion process is performed using JavaScript in the browser. There is no form submission to the server for standard encoding and decoding operations.

What is causing the decoding error?

Possible causes include characters that cannot be used in Base64, invalid character counts or padding, or the decoded data not being UTF-8 text.

What is the equal sign at the end?

The "=" at the end of a Base64 string is called padding. It is added to adjust the length of the original data to fit the Base64 unit. Depending on the use case, it may be omitted.

Does it support URL-safe Base64?

This tool is designed for standard Base64. Strings containing characters such as "-" or "_" used in URL-safe Base64 may not be decoded correctly as-is.

Can I convert image files to Base64?

This page is for text conversion only. It does not support converting files such as images or PDFs to Base64. If you need to convert files, please use a dedicated tool.

Can this be used to verify Basic Authentication strings?

Yes. For example, you can encode a string like "user:password" using Base64 to verify the values for the Basic authentication header. However, please exercise extreme caution when handling authentication credentials.