nwork

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 strings back to plain text. Supports Unicode and URL-safe Base64.

How to Use

  1. 1

    Choose encode or decode

    Select Encode to convert text to Base64, or Decode to convert Base64 back to text.

  2. 2

    Enter your text

    Type or paste the text you want to encode or decode.

  3. 3

    Copy the output

    The result appears instantly — click Copy to use it.

How It Works

This tool encodes plain text into Base64 and decodes Base64 strings back to text, supporting Unicode and URL-safe variants — commonly needed when working with APIs, config files, or data transmitted as text.

What Base64 actually does

Base64 represents binary data using only 64 printable ASCII characters (A-Z, a-z, 0-9, +, /), making it safe to include inside text-based formats like JSON, XML, URLs, or emails that can't reliably handle raw binary data or every possible text character.

Standard vs. URL-safe Base64

Standard Base64 uses + and / as part of its character set — both of which have special meaning inside a URL, so standard Base64 output can break if placed directly into a URL without additional encoding. URL-safe Base64 replaces + with - and / with _, producing output that can go directly into a URL without further escaping.

Examples

Encoding an API credential

Encoding "username:password" as Base64 for use in an HTTP Basic Authentication header, which requires credentials in that specific encoded format.

Decoding a JWT segment

JWTs (JSON Web Tokens) have their header and payload sections Base64-encoded — decoding one manually here reveals the underlying JSON before verification (see the JWT Decoder tool for a purpose-built version of this).

Common Use Cases

  • Encoding credentials or binary-like data for inclusion in API requests or headers
  • Decoding Base64 strings found in API responses, config files, or JWTs to inspect their actual content
  • Preparing Base64 data for safe inclusion in a URL using the URL-safe variant

Tips

  • Base64 is an encoding, not encryption — anyone can decode it back to the original text instantly, so never use it as a substitute for actually protecting sensitive data.
  • If your encoded output needs to go directly into a URL (as a query parameter, for example), use URL-safe encoding from the start rather than standard Base64, to avoid needing a second layer of URL-encoding on top.

Frequently Asked Questions

Related Tools