🔢

Base64 Encoder & Decoder

Encode text or files to Base64 and decode Base64 strings instantly, entirely in your browser.

Plain Text Input
Base64 Output
Quick Reference: Base64 encodes binary data as ASCII text (A–Z, a–z, 0–9, +, /). URL-safe mode replaces + with - and / with _ for safe use in URLs and JWTs.

About Base64 Encoder & Decoder

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). This tool encodes any plain text or uploaded file to its Base64 representation, and decodes Base64 strings back to human-readable text — with an optional URL-safe mode that swaps + for - and / for _ and strips padding.

The encoding and decoding logic runs entirely in your browser using the native btoa() and atob() APIs — no data is ever uploaded to a server, making it safe for encoding sensitive configuration strings or credentials during local development.

Common Use Cases

How to Use

  1. Select the Encode → Base64 tab to convert text, or Decode ← Base64 to reverse the process.
  2. Type or paste your input into the left panel — the result updates in real time in the right panel.
  3. To encode a file, click Upload File and select any file from your device; the output Base64 string and a download button will appear.
  4. Enable URL-safe mode if the Base64 output will be used inside a URL, JWT, or filename to avoid characters that require percent-encoding.

Frequently Asked Questions

Does Base64 encrypt my data?

No. Base64 is an encoding scheme, not encryption. Anyone who has the Base64 string can decode it back to the original data instantly. Do not use Base64 as a security measure — use it only when you need to represent binary data in a text-safe format, and encrypt sensitive data separately with a proper cryptographic algorithm.

What is the size overhead of Base64 encoding?

Base64 encoding increases the size of the original data by approximately 33%, because every 3 bytes of input become 4 Base64 characters. The size ratio is shown in the output stats panel after encoding. URL-safe mode without padding may produce slightly shorter strings by omitting trailing = characters.

Why do I get "Invalid Base64 string" when decoding?

The most common causes are: the string has been URL-decoded before pasting (converting + to spaces), it is missing padding characters (=), or it contains line breaks inserted by some email clients or PEM headers. This tool automatically normalises URL-safe characters and pads the string before decoding, which resolves most issues.

Advertisement