Tool collection

Base64 Encrypt/Decrypt

1
1
Input Character Count
0
Output Character Count
0
Estimated Input Size
0 B
Estimated Output Size
0 B
Tool Description

This tool is an online Base64 encryption/decryption tool that supports encoding text (including Chinese, Emoji, and other Unicode characters) into Base64 strings, or decoding Base64 strings back to original text. All operations are performed locally in your browser, and data is never uploaded to any server.

What is Base64?

Base64 is an encoding method that represents binary data using 64 printable characters. Since 2^6 = 64, every 6 bits form a unit corresponding to a printable character. 3 bytes (24 bits) can be represented as 4 Base64 characters, so the length of a Base64-encoded string is approximately 4/3 times the original data. It is commonly used to safely transmit binary data in URLs, Cookies, HTTP headers, and other scenarios.

Encoding Options Description
  • URL-safe variant:Standard Base64 uses + and / characters, but these two characters have special meanings in URLs. The URL-safe variant replaces + with - and / with _.
  • Remove padding:Standard Base64 uses = characters to pad the length to a multiple of 4. Some scenarios (such as JWT) remove these padding characters.
  • Line break every 76 characters:The MIME specification (such as email) requires inserting a line break every 76 characters.
Main Use Cases
  • Encode usernames and passwords in HTTP Basic Auth.
  • Inline images, fonts, and other resources in Data URLs.
  • The Header and Payload parts of JWT Tokens use Base64URL encoding.
  • Store binary data (such as keys and certificates) in configuration files.
  • Transmit text data that may contain special characters in API interfaces.
Tool Features
  • Two-column layout: Input and output are displayed separately, making it more intuitive to compare content before and after conversion.
  • Full Unicode support: Correctly handles Chinese, Emoji, and other multi-byte UTF-8 characters.
  • Multiple character set support: Choose from UTF-8, GBK, and Latin1.
  • URL-safe variant: Supports - and _ replacing + and /, suitable for JWT, URL parameters, and other scenarios.
  • MIME line breaks: Supports MIME specification format with line breaks every 76 characters.
  • Real-time statistics: Displays input/output character counts and estimated sizes, making it easy to evaluate encoding expansion ratio.
  • Safe and reliable: Pure front-end execution, no data uploaded, absolutely protects your data privacy.