Developer Tools

Base64 Converter

Encode text to Base64 and decode Base64 strings back to text with support for standard, URL-safe, and custom 64-character alphabets.

Run tool

Base64 Converter lets you encode plain text into Base64 format and decode encoded strings back into readable text. When encoding, the tool converts your input into UTF-8 before generating standard Base64 characters. When decoding, it converts the output bytes back into UTF-8 text and automatically appends equals-sign padding whenever an input string is not a multiple of four characters. Beyond the standard alphabet, the tool supports URL-safe formatting, which substitutes characters that might cause issues in web addresses and query strings. You can also supply a custom alphabet containing exactly 64 unique characters to handle specialized encoding schemes. Text encoded with your custom alphabet decodes reliably when using the identical character set. Both conversion directions require non-empty input to generate output. This makes the tool practical for preparing payload data, inspecting authorization headers, and converting configuration values across development workflows.

Instructions

  1. Enter or paste your text into the Text field.
  2. Select Encode to generate Base64 text, or select Decode to restore the original text.
  3. Check the URL-safe option if the encoded string will appear in query parameters or URLs.
  4. Enter a custom alphabet with exactly 64 unique characters if your workflow requires a non-standard mapping.
  5. Click the run button to perform the conversion and view the converted text in the result panel.

Examples

  • Encoding 'Hello, World!' in standard mode produces 'SGVsbG8sIFdvcmxkIQ=='.
  • Decoding 'SGVsbG8sIFdvcmxkIQ==' in Decode mode returns 'Hello, World!'.
  • Encoding text with the URL-safe option enabled replaces plus and slash characters with minus and underscore symbols, producing output suitable for URLs.

FAQ

What happens if my Base64 string is missing equals-sign padding?

The tool automatically appends equals signs during decoding to bring the text length to a multiple of four before processing.

What are the requirements for a custom alphabet?

A custom alphabet must contain exactly 64 unique characters. If any character is duplicated or the total count differs from 64, the conversion cannot proceed.

How does URL-safe Base64 differ from standard Base64?

Standard Base64 uses '+' and '/' characters, which have special meanings in web addresses. The URL-safe option substitutes '-' and '_' so the string can appear in URLs without extra percent-encoding.

Embed this tool

Add this working SmartPlusLab tool to your website with the code below.