Back to public tools
All tools

Base64 Encoder and Decoder

Encode text or a file as Base64. Paste Base64 to turn it back into readable text or download the original bytes.

Everything is processed locally. Drafts stay in memory; refreshing clears them.

Encode text or files, or decode Base64 into its original bytes. Select Convert to see results below. Base64 is reversible encoding, not encryption. Processing stays on your device.

Base64 input

Text, individual files and decoded output: 5 MiB each. Pasted Base64/data URLs: 8 MiB. Batch: up to 10 files and 20 MiB combined, published together as one ZIP. Inputs stay in memory and clear on refresh.

How to use the Base64 encoder and decoder

Encode text or a file

Choose Encode, then enter text or select File and choose a file from your device. Text uses UTF-8; file mode preserves the exact bytes. Choose Standard for most uses, or URL-safe when the receiving service asks for it. Standard always includes padding; URL-safe padding is optional.

Decode Base64 or a data URL

Choose Decode and paste the encoded text. If you have a full data: URL, choose Extract Base64 data URL to separate its header and percent-escaped payload. Review it before Convert. Only Base64 data URLs are supported; the declared charset does not change the strict UTF-8 text view.

Select the matching alphabet, or choose Detect alphabet and confirm Standard or URL-safe. Shared characters alone cannot identify the alphabet; mixed alphabets are rejected. Enable Ignore ASCII spaces, tabs, CR and LF for wrapped input. Highlight decode issue selects an invalid character, padding position or the end where characters may be missing.

Encode several files or wrap long lines

Choose Batch files to encode up to ten files into one ZIP, with a manifest and a separate text file for each input. Each file can be up to 5 MiB; the batch can total 20 MiB. Results appear only after the entire batch succeeds. Choose no line wrapping, or 64 or 76 characters with CRLF breaks. Estimate encoded size reports the exact encoded-text byte count for the selected settings; ZIP headers and manifest add more.

Inspect and save

Choose Convert after changing the input or settings. Copy or download the complete output, or save encoded data as a JSON string, JavaScript declaration or Python assignment. Quotes and escaped line breaks are included. The hex preview shows the first 256 bytes with offsets; downloads preserve every byte.

A round-trip compares bytes before and after encoding and decoding with this codec. To check decoded data against a separate original, choose the optional comparison file before Convert. A match does not prove who created the data or whether its contents are safe.

Decoded images stay unopened until you choose Preview PNG or JPEG image. Still PNG/JPEG previews are limited to 8192 pixels per side and 16 megapixels; other formats remain binary downloads. Clear resets inputs and offers Undo. Cancel stops conversion or batch packaging and keeps the input. Copy supports up to 2 MiB of text characters; previews show at most 20,000. Downloads contain the complete result.

Example: send a short greeting

Choose Encode and Try an example to load “Hej 🌷”. Keep Standard selected and choose Convert. The result is SGVqIPCfjLc=, which represents the same UTF-8 text.

Choose Decode and Try an example, then Convert to recover the greeting. To compare alphabets with a binary file, bytes FB FF encode as +/8= in Standard and -_8 in URL-safe mode without padding.

About Base64

Base64 represents bytes using text characters. It is useful when a system needs to carry a file or other binary data in a text field. Standard uses + and /; URL-safe uses - and _ instead. Standard uses canonical padding; URL-safe padding is optional. Wrapping is off by default because many receivers expect an unbroken string.

Base64 is reversible encoding, not encryption. Anyone with the encoded text can decode it, so it does not protect passwords or private documents. Decoded files are not run. Raster images are opened locally only on request; SVG and HTML are not previewed. Binary downloads preserve bytes, and text is displayed only when those bytes are valid UTF-8.

Stars and feedback

Loading…

Tool reference #112