Base64 Encode / Decode

Encode text to Base64 or decode Base64 strings back to plain text.

About this tool

Base64 shows up in JWT tokens, data URIs, email headers, and API payloads. Our Base64 tool encodes and decodes Base64 strings instantly — perfect for debugging tokens and inspecting encoded data.

How the Base64 Encode / Decode works

The Base64 tool encodes plain text to Base64 format and decodes Base64 strings back to readable text. Base64 is an encoding scheme that represents binary data as ASCII text using a 64-character alphabet (A-Z, a-z, 0-9, +, /). It is encoding, not encryption — anyone can decode it.

How to use this tool

  1. Paste or type your text or Base64 string into the text area.
  2. Select the operation: 'Encode to Base64' or 'Decode from Base64'.
  3. Click the button to see the result.
  4. Copy the encoded or decoded output.

Common use cases

Decoding JWT token payloads for debugging

Encoding text for inclusion in data URIs or API headers

Inspecting Base64-encoded API responses

Encoding binary data as text for transmission through text-only systems

Examples

  • "Hello World" encoded to Base64: "SGVsbG8gV29ybGQ=".
  • "SGVsbG8gV29ybGQ=" decoded back: "Hello World".

Tips & best practices

  • To decode JWT payloads: split by dots, take the middle segment, and decode. Replace - with + and _ with / first (JWT uses Base64url).
  • Base64 output is approximately 33% larger than the original input because 3 bytes become 4 characters.
  • Base64 is encoding, not encryption. Never use it to 'protect' sensitive data — anyone can decode it instantly.
  • The = padding at the end of a Base64 string indicates the input length was not a multiple of 3 bytes.

Common mistakes to avoid

❌ Confusing Base64 encoding with encryption — Base64 provides zero security. It is a reversible encoding scheme.

❌ Trying to decode a Base64url string (from JWT) directly without replacing - and _ with + and / first.

❌ Forgetting that Base64 decoding non-Base64 text will produce garbage or errors.

Frequently Asked Questions

What is Base64 used for?

Base64 encodes binary data as ASCII text for safe transmission through email, JSON APIs, HTTP headers, and data URIs. It is also used in JWT tokens and Basic HTTP Authentication.

Is Base64 encryption?

No. Base64 is encoding, not encryption. It is fully reversible by anyone without a key. Do not use Base64 to protect sensitive data.

Related tools

Related guides

In-depth articles to help you learn more about this topic.

Continue Learning

Explore our in-depth guides, browse related tools, or return to the full collection.