Base64 Toolbox

Encode and decode text, files and images locally with Base64, Base64URL, MIME and Data URI support

Text input

Enter text, Unicode, binary text or hexadecimal bytes.

Private by default: input is processed locally and is not saved. Press Ctrl/⌘ + Enter to run.

Try a sample:

Result

The processed result will appear here.

No result yet

Enter a value and run the operation

Examples

Encode UTF-8 text as standard Base64

Input
Hello, World!
hello
Output
Base64("Hello, World!") = SGVsbG8sIFdvcmxkIQ==
Base64("hello") = aGVsbG8=

The trailing equals signs are padding that completes the final four-character Base64 block.

Decode Base64 back to text

Input
SGVsbG8=
Output
Hello

Decoding reconstructs the original bytes, which are then interpreted here as UTF-8 text.

Compare standard Base64 with Base64URL

Input
🚀
Output
Standard Base64: 8J+agA==
Base64URL:       8J-agA

For the same UTF-8 bytes, Base64URL replaces the standard plus character with a hyphen and this representation omits padding.

About this tool

Base64 is a binary-to-text encoding that maps each three-byte block to four printable characters. It is useful when bytes must pass through a text-only channel, but the encoded value is reversible and provides no confidentiality, integrity, or authentication. Base64 is encoding, not encryption or secure obfuscation, and its output is usually about one-third larger than the original bytes.

The text workspace encodes UTF-8, ASCII, Latin-1/binary, or hexadecimal input and decodes Base64 back into the selected representation. It supports standard Base64, the URL-safe Base64URL alphabet, optional padding, MIME line wrapping, Data URLs, and strict canonical validation. File and image workspaces handle binary data without first coercing it into text.

All processing happens in the browser, so the input is not uploaded or stored by the tool. Interoperability still depends on matching the producer's alphabet, padding rules, and character encoding: the same characters encoded as UTF-8 and Latin-1 are different byte sequences and therefore produce different Base64 values.

How to use

  1. Choose encode or decode

    Open the Text workspace and select Encode for plain text-to-Base64 conversion or Decode for Base64-to-text conversion.

  2. Set the byte encoding and Base64 profile

    Choose UTF-8, ASCII, Binary/Latin-1, or Hexadecimal. When encoding, select standard Base64, Base64URL, MIME wrapped, or Data URI output and configure padding if the target protocol permits it.

  3. Process the value

    Paste the input and click Encode text or Decode Base64. Strict decoding rejects malformed or non-canonical input; lenient mode is available when a source omits padding or contains tolerated whitespace.

  4. Copy or download the result

    Copy text output directly, or download decoded bytes when the result represents binary data rather than readable text.

Use cases

Embedding small resources in Data URLs

Encode a small image or text asset for a data: URL when an inline resource is more convenient than a separate request.

Moving binary bytes through text formats

Represent a compact binary value inside a text-only field such as a JSON string, XML element, or environment variable, then decode it at the receiving boundary.

Preparing URL-safe protocol values

Use Base64URL when a specification such as JOSE/JWT requires the hyphen-and-underscore alphabet and commonly omits padding.

Inspecting encoded application data

Decode a Base64 field from an API response, configuration file, email, or log to determine which bytes or text it contains.

Common mistakes

Mistake:Treating Base64 as encryption or secure obfuscation.

Fix:Anyone can decode Base64 without a key. Use authenticated encryption when data must remain confidential, and never put a secret in a public value merely because it looks encoded.

Mistake:Removing trailing = padding without checking the receiving protocol.

Fix:Padding may be omitted only when the protocol explicitly permits it or the decoder restores it. Keep canonical padding for standard Base64 when interoperability requirements are unknown.

Mistake:Encoding characters with one charset and decoding the bytes with another.

Fix:Agree on the byte encoding, normally UTF-8, at both ends. A Latin-1/UTF-8 mismatch produces different bytes or mojibake even when the visible source text looked identical.

Mistake:Assuming standard Base64 is safe in every URL or JSON-adjacent protocol.

Fix:A plain JSON string can carry + and /, but URLs and token profiles may give those characters special meaning. Use Base64URL only where the surrounding specification requires its - and _ alphabet.

Frequently asked questions

References & standards