Base64 Encoder / Decoder

🔒 Local only Text & Writing

Encode and decode UTF-8 Base64 text locally.

Convert text to Base64 and decode Base64 back to UTF-8 text in your browser. The tool uses TextEncoder and TextDecoder so CJK text, accents, and emoji work correctly.

Tool area

How to use

  1. Paste plain text or a Base64 string into the input box.
  2. Press Encode to convert text to Base64.
  3. Press Decode to convert Base64 back to text.
  4. If decoding fails, check that the input is valid Base64.

Use cases

  • Create Base64 snippets for configuration examples or test data.
  • Inspect Base64 strings from documentation or API responses.
  • Handle UTF-8 text that includes Chinese, accents, or emoji.

Content and verification review:

How to verify a Base64 Encoder / Decoder result before relying on it

This section covers what Base64 Encoder/Decoder’s encode and decode steps actually assume: UTF-8 text in, whitespace tolerance on decode, and a decode failure that can mean two different things.

Round-trip a non-ASCII string to confirm encode and decode match

Type “Hello” and click Encode: the result is “SGVsbG8=”. Paste that result back in and click Decode: it returns “Hello” exactly. Non-ASCII text works the same way — encoding “café” produces a longer string because each multi-byte UTF-8 character expands to more Base64 characters, and decoding that string returns “café” unchanged. Round-tripping any input through Encode then Decode is the fastest way to confirm the tool handled it correctly.

Whitespace in pasted Base64 is stripped before decoding, but the alphabet still has to be valid

Before decoding, the tool removes every space and line break from the input, so Base64 copied from a source that wraps lines every 76 characters still decodes correctly. What it will not tolerate is anything outside the standard Base64 alphabet — URL-safe characters like “-” and “_”, or a string whose length (after whitespace removal) is not a multiple of 4 — either of those triggers “Invalid Base64” and clears the output.

“Invalid Base64” can mean the format is fine but the bytes are not text

Decoding uses a strict UTF-8 decoder, so a string that is valid Base64 by every formatting rule can still fail if the decoded bytes are not legal UTF-8 — for example, Base64 of an image file, or of text saved in a non-UTF-8 encoding. In that case the tool shows the same “Invalid Base64” message as a genuine formatting error, which means this tool is for encoding and decoding text, not for recovering arbitrary binary files from a Base64 string.

Acceptance checklist

  • The input has been round-tripped through Encode then Decode to confirm it returns to the original text, including any non-ASCII characters.
  • Pasted Base64 contains only letters, digits, “+”, “/”, and “=” — URL-safe variants using “-” or “_” are rejected.
  • The pasted string’s length is a multiple of 4 after whitespace is removed, or Decode reports it as invalid.
  • “Invalid Base64” is understood to potentially mean well-formed Base64 that decodes to non-UTF-8 bytes (such as binary files), not only a typo in the text.

Who is it for

  • Developers inspecting APIs, configuration files, and data URIs
  • QA teams testing Unicode text and transport formats
  • Students learning the difference between encoding and encryption

Real examples

Inspect a Base64 value from an API

Decode a short value from a trusted source and confirm that the result is expected UTF-8 text. Base64 can represent arbitrary binary data, so this text-focused tool reports an error instead of treating every byte sequence as readable content.

Create a documentation example

Encode a non-secret sample and immediately decode it to verify a round trip. Never use Base64 to hide API keys, passwords, or personal data because anyone can reverse it without a key.

Good to know

  • Base64 changes representation rather than securing data and typically increases size by roughly one third.
  • This page is designed for UTF-8 text, not arbitrary binary file conversion.
  • Avoid accidental spaces or line breaks when copying output because some receivers validate Base64 strictly.

FAQ

Does this support non-English text?
Yes. Text is converted through UTF-8 bytes before Base64 encoding, so CJK text and emoji work correctly.
Is Base64 encryption?
No. Base64 is an encoding format, not encryption. Anyone can decode it.
Why did decoding fail?
The input may not be valid Base64, or the decoded bytes may not be valid UTF-8 text.

Privacy & local processing

🔒 This tool runs entirely in your browser. No data is uploaded to any server.

This tool runs mainly in your browser. The content you enter is not sent to FunnyTools servers.

Trust & usage note

This tool runs mainly in your browser. Your input is not actively uploaded to a server. Avoid entering highly sensitive data. Results are for reference only.

Last updated:

Get updates

New tools and practical tips, straight to your inbox. No spam, unsubscribe anytime.