Base64 Encode & Decode
Paste text into the input box, then Encode to produce Base64, or Decode to recover the original string. Encoding handles Unicode via UTF-8; decoding rejects broken payloads with a clear Invalid Base64 message.
Updated 2026-08-03 · developer
About this tool
This utility exposes a multiline Input field plus Encode and Decode actions. Encode runs btoa after UTF-8-safe preparation so non-ASCII characters survive. Decode reverses that path with atob; if the string is not valid Base64, the result shows Invalid Base64 instead of crashing.
How to use
- Paste your text: Put plain text or a Base64 string into the Input textarea.
- Encode to Base64: Click Encode to turn readable text into a Base64 string in the result area.
- Decode from Base64: Click Decode when the input is Base64; valid data returns the original text.
- Fix invalid input: If decoding fails, the result shows Invalid Base64—correct the string and try again.
Common use cases
- Embed small config snippets or tokens that must travel as Base64 strings.
- Inspect a Base64 blob from an API response and read the plain text locally.
- Convert sample payloads while debugging data URLs or auth headers.
Tips
- Encode when the box holds plain text; Decode when it already holds Base64.
- If you see Invalid Base64, trim whitespace or confirm the alphabet and padding.
FAQ
Will non-English characters encode correctly?
Yes. Encoding prepares UTF-8 before Base64 so accented and CJK characters are preserved.
What does Invalid Base64 mean?
The Decode path could not parse the input with atob—check for typos, missing padding, or non-Base64 characters.
Do Encode and Decode run on a server?
Both buttons process the textarea content in your browser session.
Can I encode empty text?
Yes. Encoding an empty string yields an empty Base64 result; decoding empty input may also yield empty output.