Command Palette

Search for a command to run...

BA

Base64 Encoder/Decoder

Encode and decode text to/from Base64 format

Mode
Format
Text to Encode
0 chars
Base64 Result
0 chars
Output will appear here...
0
Input Characters
0
Output Characters
-
Size Ratio
Standard Base64 encoding (RFC 4648)
Category:coding
Mode:Offline
Version:1.0.0
Access:Free

What is Base64 Encoder/Decoder?

Base64 Encoder/Decoder interface on Toolz.dev - Encode and decode text to/from Base64 format

Base64 Encoder/Decoder is a free online tool that converts text to and from Base64 encoding. Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format, commonly used to embed data in URLs, emails, HTML, and API payloads where binary data cannot be transmitted directly.

The tool supports both standard Base64 encoding (RFC 4648) and URL-safe Base64 encoding, which replaces the + and / characters with - and _ to make the output safe for use in URLs and filenames. You can encode plain text to Base64 or decode Base64 strings back to readable text with a single click.

Whether you are a developer working with APIs that require Base64-encoded data, debugging encoded strings, or encoding configuration values, this tool provides instant conversion with clear input and output. All processing happens in your browser, keeping your data completely private.

Base64 is an encoding, not encryption, and the distinction matters because it is regularly mistaken for one. Anything encoded here can be decoded by anyone in a second, so it protects nothing: its job is to carry binary data through channels that only reliably survive text, such as email bodies, JSON strings and data URIs. The cost is size. Every three bytes become four characters, so the output is about 33 per cent larger than the input, which is why inlining a large image as a data URI can make a page slower rather than faster. The URL-safe variant swaps the two characters that have meaning in a URL, plus and slash, for minus and underscore, and is what JWTs use. Padding with equals signs is required by the standard but tolerated as optional by most decoders.

A worked example shows both formats of this Base64 encoder and decoder side by side. Type Hello, World! with Mode set to Encode and Format set to Standard, then click Encode: the Base64 Result is SGVsbG8sIFdvcmxkIQ==, 20 characters from 13, and Size Ratio reads 154%. Switch Format to URL-Safe and the same text becomes SGVsbG8sIFdvcmxkIQ, with the padding removed. The input a?b=c>d shows the character swap: Standard gives YT9iPWM+ZA== and URL-Safe gives YT9iPWM-ZA. Click Swap to send a result back through the base64 decoder encoder as new input.

How to use Base64 Encoder/Decoder?

1

Choose encode or decode

Select whether you want to encode text to Base64 or decode a Base64 string back to plain text.

2

Enter your data

Paste or type your plain text (for encoding) or Base64 string (for decoding) into the input area.

3

Get instant results

Pick Standard or URL-Safe under Format, then click Encode or Decode. For encoding, you get a Base64 string; for decoding, you get the original plain text, or an error message if the input is not valid Base64.

4

Copy the output

Click the copy button to copy the encoded or decoded result to your clipboard for use in your application or project.

Key Features

Handles Unicode Correctly

In Standard format, text is encoded through UTF-8 first, so accented characters, emoji and non-Latin scripts survive a round trip that a naive btoa call would reject

Encode & Decode

Convert text to Base64 and decode Base64 back to text with a single click toggle

URL-Safe Encoding

Supports URL-safe Base64 encoding that replaces + and / with - and _ for safe use in URLs

Swap and Size Stats

The Swap button moves the result into the input and flips the mode for a quick round trip, and the stats row shows input characters, output characters and the size ratio

Frequently Asked Questions

Base64 encoding is used to transmit binary data through text-based systems. Common uses include embedding images in HTML/CSS, encoding authentication credentials in HTTP headers, encoding email attachments, and passing binary data in JSON or XML payloads.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!

base64encodedecodeconverterurl-safeencodingdecodingbase64 encoder and decoderbase64 decoder encoderbase64 encoder decoderurl-safe base64 decoder