Base64 Encoder and Decoder

    Encode UTF-8 text to Base64 or decode Base64 and Base64URL strings back to text in your browser.

    Encode and decode Base64 text

    Use this Base64 encoder and decoder for UTF-8 text, API snippets, small JSON fragments, JWT header or payload segments, and other text-safe binary-to-text workflows.

    • Encode plain text to standard Base64.
    • Decode standard Base64 back to UTF-8 text.
    • Switch to Base64URL for URL-safe strings and JWT-style segments.
    • Keep or omit padding depending on the target system.

    Base64URL and padding

    RFC 4648 defines the standard Base64 alphabet and the URL-safe Base64URL alphabet. Base64URL replaces + and / with - and _, and many JWT workflows omit.

    Base64URL changes the alphabet for URLs and filenames, but it is still not encryption and does not protect the decoded content.

    ModeAlphabet differenceCommon use
    Base64+ and / withMIME, API payloads, data URIs, text transport
    Base64URL- and _ with often omitted paddingJWT, URL parameters, filename-safe tokens

    L is encoded length with padding, and n is input byte length.

    Base64 is not encryption

    Base64 is reversible
    Base64 is not encryption and not hashing. Anyone can decode a valid Base64 string without a password or key.

    For secrets, use encryption or authentication-specific tooling. For fingerprints, use a hash generator. Base64 only changes how bytes are represented as text.

    Frequently Asked Questions

    Sources and References

    Calculations are based on the listed reference sources. Links open in a new tab.

    Updated:

    Related Tools