Skip to content
World Cup Kickoff Time Converter is liveSee kickoff times in your time zone and add calendar reminders.

Base64 Encode/Decode

Base64 Encode/Decode handles UTF-8 text, Base64URL and MIME-wrapped output, plus image workflows for Data URLs, raw Base64, local preview, and image download.

Input Text

Characters

0 / 50,000

Base64 Encode/Decode

Quick Start

1
Choose Text, Image to Base64, or Base64 to Image.
2
Paste text/Base64, or upload one image.
3
Encode or decode text, then copy the result.
4
Copy Data URL or raw Base64 from image uploads.
5
Paste Data URL or raw Base64, choose MIME, then preview or download.

Common Scenarios

URL/JWT

Prefer the URL‑safe variant (−/_); the trailing '=' may be omitted to avoid escaping issues

Email/MIME

When wrapping is required, use MIME 76 columns (CRLF); for the web, don't wrap. This tool provides 76‑column wrapping and an LF/CRLF toggle

Multiline text

enable Per‑line encode to encode each line independently

MIME/PEM

enable 76‑column wrapping; enable LF line breaks when needed

Data URL

When embedding, generate data:[mime];base64,…; the decoder auto‑extracts the part after the comma

Round‑trip verify

encode then immediately decode to ensure fidelity

Image upload

Keep the original bytes and switch between Data URL and raw Base64 output without re-uploading

Image Data URL

paste data:image/...;base64,... to detect the MIME type automatically and preview the image immediately.

Raw Base64 image data

provide the original image MIME type so the tool can preview it automatically and download it as an image.

Encoding Parameters & Variants

URL‑safe output
Encode per line (each line independently)
Wrap at MIME 76 columns (CRLF)
Use LF for line breaks (\n)
Data URL
Raw Base64
Raw Base64 image input needs an explicit MIME type because Base64 itself does not store file format metadata
Auto‑padding: length aligned to a multiple of 4; invalid lengths are reported
Whitespace‑tolerant: line breaks and spaces are removed on decode

Text & Image Boundaries

Text encoding starts with standard Base64 (+/ with padding). URL-safe output switches to Base64URL (-/_ with padding omitted by default).
Decode accepts standard Base64 and Base64URL, strips whitespace, adds padding when possible, and extracts the payload after a Data URL comma.
Image to Base64 accepts one image at a time and keeps the original bytes; it does not compress, crop, resize, optimize, scan, or convert formats.
Raw Base64 image input has no MIME metadata. Choose the original image type before previewing or downloading.
Large text and images are limited by the text execution boundary, Data URL length, browser memory, and browser image preview support.
For non-image binary files, use a dedicated file tool or CLI. Text mode decodes bytes as UTF-8, so arbitrary binary data may look garbled.

Usage Advice

Text mode uses UTF-8 by default. If you need GBK, Shift-JIS, or another encoding, convert it first before using this tool.
Standard Base64 is the default. Turn on URL-safe output only when the target expects Base64URL (-/_ with padding omitted by default).
When exchanging across systems, strip line breaks/spaces; add only for display
Base64 increases data size by about 33%; split very large text and avoid using it as a storage format for large files.
Standard Base64 for legacy systems: disable URL‑safe (keep +/ and =)
Per‑line encode re‑encodes existing Base64; for variant conversion only, turn it off before encoding
76‑column wrapping affects display only; the decoder ignores breaks and whitespace
When sharing raw Base64, keep the original MIME type with it so the receiver can reconstruct the file correctly
Preview availability depends on browser image support; if preview fails, download still keeps the original bytes

Limitations & Compatibility

Text mode decodes bytes as UTF-8 text. For non-image binary files, use a dedicated file tool or CLI instead of this page.
Image upload, Data URL length, and preview size are limited by browser memory and browser image-format support.
Some image formats may encode successfully but remain unpreviewable in the current browser

Privacy & Security

Base64 processing runs in your browser. Text input, Base64 image input, selected images, and settings may stay in the current session or browser storage. If you save a workspace or enable WebDAV sync, those inputs, the selected image attachment, and settings may be saved according to your sync settings. On shared devices, clear input, images, and site data when needed.
Security note: Base64 is encoding, not encryption. It does not hide, verify, or scan content; encrypt sensitive data before encoding.

FAQ

8

Continue with these related tools for the next step.

All tool processing happens locally in your browser.