TXT · Text & Data tools

Base64 Encoder

Input
Output
EncodemodeBatchinput0items1output lines0output chars

Encode text to Base64, or decode Base64 back into readable UTF-8 text. Base64 is widely used to safely transport binary data and text payloads across formats like JSON, URLs, and email headers.

The tool handles both standard and URL-safe Base64 formats. It can also extract and decode the Base64 payload embedded directly inside a data URL (like data:text/plain;base64,...).

Formatting options

When encoding, you can customize the Base64 output to match the format your system expects:

  • URL-safe: Replaces + and / with - and _ so the output can be placed safely into query strings or JSON web tokens without escaping.
  • Strip padding: Drops trailing = characters from the end of the string.
  • Wrap @ 76: Breaks long outputs with newlines every 76 characters, a common formatting requirement for legacy email and MIME systems.

Decoding Base64

Decode mode automatically accepts standard Base64 and URL-safe Base64. It restores missing padding characters if necessary before decoding the value back into UTF-8 text. If the payload is not valid UTF-8 text, the visible result may not be meaningful.

Batch lines

Batch mode treats each non-empty line as a separate item. Use it when you need to encode or decode a list of tokens, secrets, or values simultaneously. You can optionally trim whitespace from each line before it gets processed.

Frequently Asked Questions

It encodes and decodes UTF-8 text. Paste text to encode, or paste Base64 to decode. It can also decode Base64 embedded inside a data URL (for example: data:text/plain;base64,AAAA…).

Base64URL is a web-friendly variant that replaces '+' with '-' and '/' with '_' and often omits '=' padding. It’s commonly used in JWTs and URL parameters. This tool can output URL-safe Base64 and can also decode URL-safe Base64 automatically.

Standard Base64 may end with '=' or '=='. Stripping padding removes those characters, which is common in Base64URL. When decoding, the tool automatically restores padding if needed.

It inserts line breaks every 76 characters, a common formatting convention for Base64 in MIME/email and some legacy systems.

In batch mode, each non-empty line is treated as a separate item. This is ideal when you have many values to encode or decode at once.

No.. Your data stays on your device while it’s encoded or decoded.

Explore Our Tools

Browse all tools