Shard Tools

Base64 Encoder and Decoder

Encode UTF-8 text to standard Base64 or decode Base64 back to Unicode text locally in your browser, with strict malformed and non-text error handling.

Maintained by Roshan.

Browser-local encoder

Use Base64 Encoder and Decoder

This text tool uses UTF-8 before Base64 encoding and rejects decoded binary that is not valid UTF-8.

During the latest release check, a known Base64 sample was decoded in the browser and matched the expected text. The reverse action then encoded that text back to the original Base64 value without a network request.

Explore developer and data tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all developer and data tools

About Base64 Encoder and Decoder

Base64 turns bytes into printable ASCII characters so data can travel through text-oriented systems. It is encoding, not encryption: anyone can reverse it, and the output is usually about one-third larger than the original bytes. This tool handles text deliberately. Encoding first converts Unicode text to UTF-8 bytes, so names, emoji, and non-Latin scripts round-trip correctly. Decoding validates standard Base64, reconstructs the bytes, and then requires those bytes to be valid UTF-8 text. Binary files are rejected instead of being displayed as damaged characters. Both directions run locally without posting tokens, credentials, or payloads to a decoding service.

Using Base64 Encoder and Decoder

  1. Choose Encode when the input is ordinary text. The browser's UTF-8 encoder converts each character sequence into bytes, including multibyte characters. Those bytes are then mapped into the standard A-Z, a-z, 0-9, plus, and slash Base64 alphabet with equals padding when required.
  2. Choose Decode for standard Base64. Whitespace is ignored because encoded data is often line-wrapped in email or configuration files. Other unexpected characters, invalid padding shape, and impossible lengths are rejected before decoding.
  3. Decoded bytes pass through a strict UTF-8 decoder. A valid Base64 string can represent an image, compressed archive, or arbitrary binary sequence; that does not make it readable text. The tool reports this distinction rather than substituting replacement symbols.
  4. The result reports input bytes and output character counts. Base64 works in groups of three input bytes and four output characters, so expansion is expected. Copy transfers only the displayed result to the local clipboard.
  5. Input is limited to one million characters. This page is intended for text snippets, API payload fragments, basic credentials during local debugging, and configuration values. Large files need a streaming file encoder with download controls.

Where base64 encoder and decoder helps

Unicode configuration value

Encoding a value containing 東京 and an emoji works because the text becomes UTF-8 bytes before Base64 conversion. Decoding restores the original characters.

Binary image data

A PNG may be valid Base64 but is not UTF-8 text. This text-focused tool stops with a clear binary-data message rather than showing corrupted output.

Before you use the result

Questions about Base64 Encoder and Decoder

Is Base64 encryption?

No. It is a reversible representation of bytes and offers no password, key, secrecy, or tamper protection.

Does it support emoji and international text?

Yes. Encoding uses UTF-8 and decoding requires valid UTF-8, so multilingual text and emoji round-trip correctly.

Why is my valid Base64 rejected as non-text?

The decoded bytes likely represent a file or another binary format. This tool intentionally returns only valid UTF-8 text.

Is the input sent anywhere?

No. Byte conversion, Base64 processing, validation, and copying occur inside the browser with no tool endpoint.

Related tools

JWT Decoder

Decode a JSON Web Token and inspect claims and expiry in your browser. Your token is never transmitted.

JSON Formatter and Validator

Format, minify, and validate JSON locally in your browser. Inspect keys, values, nesting depth, and root type without sending private API data to a server.

URL Encoder and Decoder

Percent-encode and decode URLs in your browser, choosing between encoding a value inside a URL and encoding a whole address. Shows which characters differ.