# Base64 Encoder/Decoder

Encode and decode Base64 strings

> Canonical page: https://test.elysiatools.com/en/tools/base64-encoder

- **Category:** Format Conversion

- **Keywords:** base64, encode, decode, base64 encoder, base64 decoder

## Overview

The Base64 Encoder/Decoder converts plain text into standard Base64 ASCII strings and translates Base64-encoded text back into readable output without extra formatting parameters.

## Inputs

- **Text Input** (textarea): Enter text to encode/decode...
- **Operation** (select)

## When to use

- Preparing raw text strings or credentials for configurations and HTTP Authorization headers.
- Inspecting Base64-encoded text values found in API payloads, query strings, or server logs.
- Testing and confirming standard Base64 encoding behavior during web or application development.

## How it works

- Paste or type your content into the Text Input field.
- Select either Encode or Decode from the Operation dropdown.
- Read the generated text output in the result panel.
- Check the output for correct text formatting or standard '=' padding characters.

## Use cases

- Generating basic authentication credentials: Enter 'username:password' into Text Input with Operation set to Encode to obtain the header token.
- Diagnosing encoded application payloads: Paste an encoded response or log snippet into Text Input with Operation set to Decode to read the underlying plain text.
- Preparing plain text for transport: Encode sensitive characters or formatting-sensitive text into safe ASCII Base64 representation for text-only storage.

## Frequently asked questions

### What operations are supported?

The tool supports two operations: Encode (converts text to standard Base64) and Decode (converts standard Base64 to text).

### Can I upload files like images or PDFs?

No. The tool takes input exclusively through the Text Input textarea.

### Does this tool output URL-safe Base64?

No. It uses standard Base64 with '+', '/', and '=' padding. Use a Base64URL tool if you need URL-safe substitutions.

### Why did my decoding operation fail?

Decoding fails when the input contains characters outside the standard Base64 alphabet, has a length remainder of 1, or decodes to bytes that are not valid UTF-8 text.

## Related tools

- [Base64 Converter](https://test.elysiatools.com/en/tools/base64-converter): Encode and decode data to/from Base64 format with URL-safe options
- [Base64URL Encoder/Decoder](https://test.elysiatools.com/en/tools/base64url-encoder): Encode and decode Base64URL (URL-safe Base64 variant used by JWT/JWS/JWE), with conversions between standard and URL-safe Base64
- [Caesar Cipher](https://test.elysiatools.com/en/tools/caesar-cipher): Encode, decode, and brute-force the Caesar cipher with any shift (1–25), or print all 25 candidate decodings.
- [Hex to String Converter](https://test.elysiatools.com/en/tools/hex-to-string): Convert text to and from hexadecimal strings with flexible spacing, prefix (0x/\x/U+), and case options
- [Text to Binary Converter](https://test.elysiatools.com/en/tools/text-to-binary): Convert text to and from binary bit strings using ASCII (7-bit) or UTF-8 (8-bit) encoding
- [ASCII85 Converter](https://test.elysiatools.com/en/tools/ascii85-converter): Encode and decode text to/from ASCII85 format (Adobe version)
- [Atbash Cipher](https://test.elysiatools.com/en/tools/atbash-cipher): Encode and decode text using Atbash substitution cipher (reverses the alphabet)
- [Base32 Converter](https://test.elysiatools.com/en/tools/base32-converter): Encode and decode text to/from Base32 format with multiple variants

## Samples

- [Copyright-Free MP3 Audio Samples](https://test.elysiatools.com/en/samples/mp3-samples): Collection of royalty-free audio samples for testing and development purposes including nature sounds, meditation music, and ambient audio
- [Hex/Unicode Encoding Format Samples](https://test.elysiatools.com/en/samples/text-hex-unicode-formats): Examples of hex (\xXX) and unicode (\uXXXX) escape sequence encoding formats
- [Android Image Processing Java Samples](https://test.elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://test.elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
