UTF-8 safe. Decode accepts standard and URL-safe Base64. For images, use Base64 to Image.

Help Us Improve

(—)

Base64 decode & encode

Base64 decode or encode text online—UTF-8 safe, URL-safe option, copy result. Local-first. No signup.

What is Base64 decode?

Base64 decode converts a Base64 text string back into its original bytes or UTF-8 text. Encoding does the reverse—binary or text becomes an ASCII-safe string for JSON, HTTP, and email. Use this free local-first tool to base64 decode or encode text online without signup. For pictures, use Base64 to Image or Image to Data URI instead.

What you can do here

Fast Base64 decode and encode for developers debugging payloads.
  1. Decode Base64 to text: Paste encoded strings from APIs, JWT fragments, or logs and read the plaintext.

  2. Encode text to Base64: Convert UTF-8 strings into standard or URL-safe Base64 for headers and embeds.

  3. URL-safe option: Toggle URL-safe alphabet when encoding for query strings and filenames.

  4. Copy and download: Copy the result, download a .txt file, or open output in a new tab.

How to base64 decode or encode

From paste to copy in a few steps.
  1. Choose Decode or Encode

    Decode turns Base64 into text; Encode turns text into Base64.

  2. Paste your input

    Drop a Base64 string or plain text into the input field.

  3. Copy the result

    Review the output, then copy, download, or open it in a new tab.

Tips for Base64 work

Avoid common encode/decode mistakes.
  • 01

    Strip whitespace when decoding

    This tool ignores spaces and newlines in Base64 input—paste wrapped strings freely.

  • 02

    Prefer UTF-8-aware tools

    Avoid btoa on raw Unicode in older snippets; this page uses TextEncoder for safe UTF-8.

  • 03

    Images need a different tool

    Binary image Base64 belongs on Base64 to Image / Image to Data URI, not this text converter.

  • 04

    Keep payloads private

    Local-first processing means tokens and secrets never leave your device for this conversion.

Great for

Where developers use Base64 decode and encode day to day.
  • API and webhook debugging

    Decode Base64 fields in JSON payloads, auth headers, and callback bodies.

  • Config and env snippets

    Encode secrets or certificates for environment variables and config files.

  • Quick sanity checks

    Verify that encode → decode round-trips before shipping client code.

Why use this Base64 tool

Built for local, UTF-8–safe conversions.
  • Local-first

    No upload and no signup—encode and decode stay in the browser.

  • UTF-8 safe

    Unicode and emoji survive encode/decode without mojibake.

  • Decode-first UX

    Defaults to Base64 decode for the common “inspect this payload” job.

  • Free to use

    Unlimited conversions in-session with copy and download helpers.

Technical notes

How this Base64 encoder/decoder works in the browser.
Encoding
TextEncoder produces UTF-8 bytes; btoa builds standard Base64; URL-safe mode rewrites +/ and strips padding.
Decoding
Whitespace is stripped; URL-safe -/_ map to +/; padding is restored; atob + TextDecoder yield UTF-8 text.
Privacy
All conversion runs client-side. No network request is required for encode or decode.
Limits
Very large strings may hit browser memory limits; keep payloads to typical API/debug sizes.

Sources & References

Standards and browser APIs behind Base64 encode and decode.
  • Base64 encoding is designed to represent arbitrary sequences of octets in a form that is resistant to alterations in transit.
    IETF — RFC 4648

    RFC 4648 — The Base16, Base32, and Base64 Data Encodings: Defines the standard and URL-safe Base64 alphabets this tool follows when encoding and decoding text. datatracker.ietf.org/doc/html/rfc4648

  • The btoa() method creates a Base64-encoded ASCII string from a binary string.
    MDN Web Docs — btoa()

    MDN — Window.btoa(): Browser API used (with TextEncoder) to produce Base64 from UTF-8 text in this page. developer.mozilla.org/en-US/docs/Web/API/Window/btoa

  • The TextDecoder interface represents a decoder for a specific text encoding, such as UTF-8.
    MDN Web Docs — TextDecoder

    MDN — TextDecoder: Used after atob so Base64 decode returns correct Unicode rather than Latin-1 mojibake. developer.mozilla.org/en-US/docs/Web/API/TextDecoder

Frequently Asked Questions

Quick answers about this tool—open a question to read more.