Base64 String Encoder and Decoder

Encode text to Base64 and decode Base64 back to text in your browser, with correct UTF-8 handling for Chinese and other multi-byte characters and support for both standard and URL-safe Base64.

FreeOnline Tool
Loading…

How to Use

  1. Type or paste the text you want to encode into the input box.
  2. Click "Encode" to turn the text into a Base64 string.
  3. Or paste a Base64 string and click "Decode" to restore the original text.
  4. Click the copy button to copy the result.

Features

  • Two-way conversion: Base64 encoding and decoding of text
  • Correct UTF-8 handling for Chinese and other multi-byte characters
  • Supports both standard Base64 and the URL-safe variant
  • Converts in real time as you type
  • One-click copy of the result

Use Cases

Inspecting a JWT payload
The header and payload of a JWT are Base64Url encoded, so decode them here to see the claims the token actually carries.
Building HTTP Basic auth headers
HTTP Basic authentication requires username:password to be Base64 encoded in the request header, which you can generate here in seconds.
Debugging APIs
Some endpoints transport data as Base64, so encode and decode payloads quickly to see what is really being sent.
Working with encoded configuration values
Kubernetes Secrets and Docker registry credentials store values as Base64, so encode or decode them here to verify and debug your configuration.

FAQ

Is Base64 a form of encryption?
No. Base64 is an encoding scheme, not encryption. Anyone can decode a Base64 string; it simply represents binary data as printable characters and provides no security whatsoever.
Does it handle Chinese characters correctly?
Yes. Text is processed as UTF-8 before encoding, so Chinese, Japanese, emoji and other multi-byte characters encode and decode without corruption.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses +, / and =, which must be escaped inside a URL. URL-safe Base64 replaces + with - and / with _, making it safe in URL parameters. JWTs use URL-safe Base64 without the = padding.
Why does decoding fail with an error?
A Base64 string's length must be a multiple of 4, padded with = when necessary. Truncating the string when pasting, or letting stray spaces and line breaks slip in, will break decoding, so check that the input is complete.