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?
What you can do here
Decode Base64 to text: Paste encoded strings from APIs, JWT fragments, or logs and read the plaintext.
Encode text to Base64: Convert UTF-8 strings into standard or URL-safe Base64 for headers and embeds.
URL-safe option: Toggle URL-safe alphabet when encoding for query strings and filenames.
Copy and download: Copy the result, download a .txt file, or open output in a new tab.
How to base64 decode or encode
Choose Decode or Encode
Decode turns Base64 into text; Encode turns text into Base64.
Paste your input
Drop a Base64 string or plain text into the input field.
Copy the result
Review the output, then copy, download, or open it in a new tab.
Tips for Base64 work
- 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
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
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
- 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
“Base64 encoding is designed to represent arbitrary sequences of octets in a form that is resistant to alterations in transit.”
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 — 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 — TextDecoder: Used after atob so Base64 decode returns correct Unicode rather than Latin-1 mojibake. developer.mozilla.org/en-US/docs/Web/API/TextDecoder