ToolkitBook

Base64 Encoder & Decoder: Convert Text to Base64 and Back Online

Encode and decode Base64 data directly in your browser with full control over padding and URL-safe formatting. The decode section takes an existing Base64 string and recovers the original text, while the encode section transforms plain text into its Base64 equivalent. Toggle URL-safe mode to replace standard "+" and "/" characters with "-" and "_" for use in URLs, query strings, and filenames. You can also adjust padding settings—choosing between auto-pad, keep as-is, or strip—to ensure compatibility with Base64 variants from different systems.

FAQ

How do I decode a Base64 string?

Paste your encoded string into the "Base64 String" field within the decode section, select your preferred padding mode, and click "Decode". The recovered text will instantly appear in the output field below.

What do the padding options do?

Standard Base64 strings require a length that is a multiple of four. If a string does not meet this requirement, one or two "=" characters are typically appended as padding. Since some systems omit these characters (such as in URL query strings), this tool offers three decoding behaviors:

When encoding, select "Standard" to include the "=" padding or "Without padding" to omit it entirely.

What is URL-safe mode?

Standard Base64 uses the "+" and "/" characters, which can interfere with URL syntax. URL-safe Base64 replaces these with "-" and "_" respectively. Enable this option if you are encoding data for use in a web address, a query parameter, or a filename, or if you are decoding a string generated for those purposes.

Can I decode binary data?

This tool is specifically designed to convert between Base64 and UTF-8 text. It does not support binary content, such as images or compressed files; attempting to decode such data will result in unreadable or "broken" output.

Is my data sent to a server?

No. All encoding and decoding tasks are handled locally by your browser's JavaScript engine. No data is transmitted over the network or stored on our servers.

Why does the decoded output contain garbled text?

Garbled output usually occurs if the input is not a valid Base64 string or if the input represents binary data rather than plain text. Ensure you have pasted the complete string and that your padding and URL-safe settings match the method used to create the original Base64 string.

More Tools