Skip to content
Devlar

Runs in your browser. Your input stays on your device.

Base64 Encoder and Decoder

Convert text or any file to Base64 and back. Text is handled as UTF-8, so emoji, Arabic, Urdu, Chinese, and every other script come out exactly as they went in.

Mode
Encoding options

Opens a file from your device. The file is read in your browser and is not uploaded.

0 characters · 0 B

0 characters · 0 B

Privacy: This tool runs in your browser. Your input is processed on your device and is never uploaded to a server.

How to use

  1. Choose Encode to turn text or a file into Base64, or Decode to turn Base64 back into text or a file.
  2. Type or paste into the input box, or select Open file (you can also drop a file onto the box). In Encode mode a file is encoded byte for byte, whatever its type, up to 10 MB.
  3. For encoding, pick the options you need: URL-safe output, padding, or a complete data URI.
  4. Short input updates as you type. For long input, select Encode to Base64 or Decode from Base64, or press Ctrl+Enter (Cmd+Enter on a Mac) anywhere in the tool, not only in the input box. Press ? to see all keyboard shortcuts.
  5. Copy the result or download it. If decoded data is not readable text, it is offered as a file download instead of being shown.

Example

Text with Chinese, Arabic, and an emoji, encoded as standard Base64 of its UTF-8 bytes.

Input
Hello, 世界! 👋 مرحبا
Output
SGVsbG8sIOS4lueVjCEg8J+RiyDZhdix2K3YqNin

Frequently asked questions

Is Base64 a way to encrypt or hide data?

No. Base64 is an encoding, not encryption, and it provides no security at all. It only rewrites bytes as 64 printable characters so binary data can pass through systems built for text, such as email, JSON, or HTML. Anyone can decode it instantly without a key or password, so never use it to protect passwords, tokens, or personal data.

Why not just use btoa() in the browser?

btoa() only understands characters in the Latin-1 range. It throws an error for emoji, Arabic, Urdu, or Chinese text, and it silently encodes accented Latin letters such as ë as single Latin-1 bytes rather than UTF-8. This tool converts text to UTF-8 bytes first and then encodes them, which matches what most programming languages, APIs, and command-line tools produce.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meanings in URLs and file names. The URL-safe alphabet from RFC 4648 replaces them with - and _, and the = padding at the end is often dropped. JSON Web Tokens use this form. When decoding, this tool accepts both alphabets, with or without padding.

Why is the Base64 output larger than the input?

Every 3 bytes of input become 4 characters of output, so encoded data is about 33% larger, plus up to two padding characters. That overhead is the price of representing arbitrary bytes using only safe, printable characters.

Can I turn Base64 back into an image or other file?

Yes. Paste the Base64 in Decode mode. When the decoded bytes are not readable UTF-8 text, the tool says so and offers Download to save them as a file. If the input starts with a data URI prefix such as data:image/png;base64, the prefix is removed and the file type is used to name the download.

URL Encoder and Decoder

Percent-encode text for URLs or decode it back, with clear errors and a breakdown of every URL part and query parameter.

JWT Decoder

Decode JSON Web Tokens in your browser: header, payload, and claims with expiry times, plus warnings for risky tokens.

Keyboard shortcuts

Run the tool, from anywhere in it
Ctrl+Enter
Show this list (outside text fields)
?
Close this list
Esc