Base64 Encode & Decode

Working

Encode or decode Base64 text, files and URL-safe values in one local workspace. Free, no signup or input upload. Encoding is not encryption; choose text or byte mode carefully.

  • Text & Encoding
  • Encode or decode Base64
  • Local processing for supported tools
  • No queue, no waiting room

Base64 Encode & Decode

Working
Working

This tool is working for the representative inputs recorded in its tests. Processing happens locally; different files, settings and browsers can still have limits. Base64 is encoding, not encryption or compression. Text mode replaces invalid UTF-8; use file mode to retain arbitrary bytes.

No upload for supported tools — the file is processed by this browser Up to 50 MiB

About Base64 Encode & Decode

Base64 Converter gives you six explicit workflows: Encode file bytes to Base64, Encode UTF-8 text to Base64, Decode Base64 to a file, Decode Base64 to UTF-8 text, Encode text to Base64URL, and Decode Base64URL to UTF-8 text. File modes preserve arbitrary bytes, while text modes use nonfatal UTF-8 decoding and can insert replacement characters for malformed sequences. You may upload a file or paste text, subject to a 50 MiB limit. A chosen download extension labels decoded bytes; it does not transform or verify their format.

How to use Base64 Encode & Decode

  1. Choose Upload file or Paste text, then select the mode that matches whether you need exact bytes, UTF-8 text, or the URL-safe alphabet. Do not treat those representations as interchangeable.
  2. For standard Base64 encoding, optionally add a data URL prefix or wrap lines. Those controls apply to Encode file bytes and Encode UTF-8 text, not to decoding or Base64URL modes.
  3. When decoding to a file without a data URL media type, enter the extension you want on the download. Regard it as a filename label for the decoded byte sequence, not as conversion.
  4. Run the action and compare the result with the expected consumer. Use file mode for binary round trips, and inspect replacement characters if malformed bytes pass through a text workflow.

When to use Base64 Encode & Decode

  • Represent arbitrary file bytes as standard Base64 text and later restore those bytes through file decoding.
  • Encode or decode known UTF-8 text when replacement behavior for malformed input is acceptable.
  • Produce or read unpadded URL-safe Base64 text using the dedicated Base64URL modes.

When not to use Base64 Encode & Decode

  • If you need to change between character sets such as Windows-1252 and UTF-8, use character encoding conversion rather than Base64. Text Tools
  • If you need percent escapes for URL components or form data, use URL Encoder instead of substituting Base64URL. URL Encoder & Decoder
  • If the goal is an integrity digest or keyed authentication value, choose the hash and HMAC workflow because Base64 provides neither property. Hash & HMAC Generator

Example

Before

evidence.txt was 36 bytes and was processed in Encode UTF-8 text to Base64 mode without a data URL prefix or line wrapping.

After

evidence.txt was a 48-byte plain-text Base64 result in the recorded evidence run.

The measured example covers the text-encoding mode only; binary preservation, URL-safe behavior, malformed input, and boundary limits are verified by separate tests.

Limits

  • Each upload or pasted-input file is limited to 50 MiB. Base64 output commonly occupies more characters than the source bytes, and browser memory must hold the input and generated result.
  • The six available modes are fixed: encode-file, encode-text, decode-file, decode-text, encode-url, and decode-url. No seventh automatic mode infers whether byte or text semantics are intended.
  • Text and Base64URL workflows use UTF-8 with nonfatal replacement for malformed sequences. Select file modes when every byte must survive exactly rather than becoming replacement characters.
  • A data URL media type can select a decoded filename extension; otherwise the decode-file extension field supplies one. Neither path converts, validates, or guarantees the underlying file format.

Frequently asked questions

Which modes preserve arbitrary binary bytes?

Encode file bytes to Base64 and Decode Base64 to a file provide the byte-oriented round trip. Text and Base64URL modes deliberately interpret data through UTF-8.

What happens to malformed UTF-8 in text mode?

Processing remains nonfatal. Invalid sequences become Unicode replacement characters, so the resulting text can differ from the original byte stream even though an output is produced.

Does naming decoded bytes with a PNG extension create an image?

No. The extension only labels the download. The Base64 payload must already contain suitable PNG bytes, and this tool does not validate or convert them into an image.

When do Data URL and Wrap lines apply?

They apply only to the two standard encoding modes. Decode operations and URL-safe encoding do not use those optional output decorations.

Is Base64 a form of encryption or compression?

No. It is reversible byte representation and often expands the data. Anyone with the encoded value can decode it, so it does not supply secrecy or authentication.

Related tools

Last tested , reviewed by Usman Ali.