Base64 Encoding & Decoding Tools

Base64 encoding converts UTF-8 text into plain ASCII using 64 safe characters — common for JWT segments, email attachments, data URIs, and APIs that transmit data as text. Encode text for transmission or decode Base64 back to UTF-8.

Base64 Tools

  • Base64 Encoder

    Convert UTF-8 text or local file bytes to Base64. Choose standard (+/ with padding) or URL-safe (-_ without padding) output, and optionally wrap standard output at 76 characters.

  • Base64 Decoder

    Turn Base64 or Base64URL strings into UTF-8 text. Paste an encoded segment and click Run — handy for JWT payloads and API responses. Binary data may show replacement characters.

  • Data URI Encoder

    Wrap UTF-8 text in a data: URL with Base64 encoding. Set the MIME type in tool settings (default text/plain; charset parameters allowed), paste content, and click Run.

  • Data URI Decoder

    Paste a data: URI to extract the MIME type and decoded content. Supports Base64-encoded and percent-encoded payloads. Binary MIME types may not display as readable text.

What Is Base64 Encoding?

Why developers use Base64

Base64 converts binary data into plain ASCII text using 64 safe characters. It is the standard way to embed small binary payloads in JSON, XML, email (MIME), and JWT segments. APIs that only accept text, data URIs in HTML, and Basic Auth headers all rely on Base64 encoding.

Common workflows

  • Encode credentials or binary snippets before sending them in HTTP headers or JSON fields
  • Decode JWT payloads, API responses, or email MIME parts for inspection
  • Data URIs — embed small images or fonts inline in HTML or CSS
  • Debug — verify what an upstream service actually encoded before blaming your client code

Base64 is not encryption

Anyone can decode Base64 instantly. Never use it to hide passwords, API keys, or sensitive data. For secrets, use proper encryption and key management. Base64 only makes binary data transport-safe — it does not protect it.

URL-safe variants

Standard Base64 uses +/ and padding =. URL-safe Base64 replaces + with - and / with _, and often omits padding. The Base64 Decoder accepts both alphabets — use the JWT Decoder for full token inspection.

Frequently asked questions

Does Base64 compress data?

No. Base64 increases size by about 33% because it represents every 3 bytes as 4 ASCII characters.

When should I use URL encoding instead of Base64?

URL encoding (percent-encoding) escapes individual characters for safe use in URLs and query strings. Base64 represents arbitrary binary or text as a compact ASCII block. Use URL encoding for query parameters; use Base64 for binary payloads in text-only channels.

Can I encode files with these tools?

These tools accept text input. For binary files, read the file bytes in your language (Node.js Buffer, Python bytes) and encode those bytes directly.