100% offline
Developer
Free · no signup
Updated

Base64 Encoder / Decoder

A Base64 tool encodes arbitrary text or binary data into the Base64 ASCII representation and decodes Base64 strings back to their original form, performed entirely in the browser with no server round-trip.

Input
Output
Output appears here…
UTF-8 text is encoded byte-by-byte. Toggle Base64URL for URL-safe output.

About Base64 Encoder / Decoder

Paste a string to encode it as Base64, or paste a Base64 blob to decode it back to UTF-8 text. The tool uses the browser's native btoa/atob along with TextEncoder/TextDecoder so it correctly handles Unicode characters that the raw btoa would otherwise reject. Use it to embed payloads in URLs, debug API responses, or inspect JWT segments.

What Base64 Encoder / Decoder does

  • Encode arbitrary text to standard Base64
  • Decode Base64 back to UTF-8 text
  • Unicode-safe via TextEncoder/TextDecoder around native btoa/atob
  • Detects and decodes Base64URL (URL-safe '-' and '_' variant)
  • Side-by-side input/output editors with one-click copy
  • Zero network — encoding runs on the browser's native primitives

When to reach for Base64 Encoder / Decoder

  • Decoding the header or payload of a JWT to inspect the claims
  • Encoding a binary payload to embed it as a data URI in HTML or CSS
  • Round-tripping non-ASCII text (emoji, CJK, accented Latin) safely
  • Inspecting Base64-encoded fields in a SAML or OAuth response
  • Encoding short payloads for compact URL parameters

How to use Base64 Encoder / Decoder

  1. 01

    Paste your text

    Paste raw text into the encode pane, or paste a Base64 string into the decode pane.

  2. 02

    Choose Base64 or Base64URL

    Toggle Base64URL if your token uses the URL-safe alphabet (used by JWTs).

  3. 03

    Copy the result

    The output updates live as you type. Click Copy to put it on your clipboard.

When to use Base64 Encoder / Decoder vs alternatives

AlternativeUse Base64 Encoder / Decoder when…Use the alternative when…
OpenSSL or `base64` CLIyou want an instant visual round-trip in the browser.you are scripting in a shell pipeline.
Online Base64 image encoderyou have plain text or a payload string.you need to embed an actual image file as a data URI.

Frequently asked questions

Does the tool handle emoji and non-ASCII characters?
Yes. We pipe the input through TextEncoder before calling btoa, so multi-byte Unicode like emoji, CJK characters, and accented letters round-trip correctly.
Is Base64 encryption?
No. Base64 is an encoding — anyone who sees the string can decode it back instantly. Never use it to hide passwords or secrets.
What's the difference between Base64 and Base64URL?
Base64URL replaces the '+' and '/' characters with '-' and '_' so the result is safe to embed in URLs and filenames without escaping. JWTs use Base64URL.
Can I decode a Base64-encoded image?
This tool handles text only. To preview a Base64 image, paste it into an HTML <img> tag's src attribute as a data URI.

Related concepts