Base64 Encoder/Decoder

    Base64 Encoder/Decoder

    Encode and decode Base64 strings

    About the Base64 Encoder / Decoder

    Base64 is a binary-to-text encoding that represents arbitrary bytes using a 64-character safe ASCII alphabet. It's how JWTs travel through URLs, how images get embedded in CSS data URIs, and how binary payloads fit into JSON fields. This tool roundtrips UTF-8 text correctly — naive implementations using only btoa/atob break on emoji and non-Latin scripts because those APIs assume Latin-1.

    Features

    How it works

    1. Paste text to encode, or a Base64 string to decode.
    2. Click Encode or Decode.
    3. Copy the result.

    Use cases

    Frequently asked questions

    What is Base64?

    +

    Base64 encodes arbitrary binary data as a string of 64 safe ASCII characters (A–Z, a–z, 0–9, +, /, =). It's used everywhere binary data must travel through text-only transports (email, JSON, URLs).

    Is Base64 encryption?

    +

    No. It's reversible by anyone in one step. Never use Base64 to 'hide' secrets.

    Why does decoded output look garbled?

    +

    The input likely wasn't UTF-8 encoded text to begin with. Base64 itself is just a bytes-to-text codec; what those bytes *mean* is a separate question.

    Can I encode a file?

    +

    This tool accepts text input only. For files, use our Hash Generator (which supports files), or open the dev console and run btoa on the ArrayBuffer.

    What's URL-safe Base64?

    +

    A variant that replaces +/ with -_ and drops padding. Standard Base64 contains characters that need URL-encoding; URL-safe Base64 avoids that round trip.