Skip to content
Kordu Tools Kordu Tools

Base64 Encoder

Runs in browser

Encode text or binary files to Base64 or Base64URL. Supports MIME line wrapping, data URIs, and files up to 50 MB. Fully browser-based.

Last updated 02 Apr 2026

Encode any text or binary file to Base64 (standard or URL-safe) in real time. Supports UTF-8 text, file upload, 76-character MIME line wrapping, and data URI generation. All processing runs in your browser — nothing is uploaded to a server.

Looking for the Base64 Decoder?

Loading rating…

How to use

  1. 1

    Choose Standard or URL-safe mode

    Select Standard Base64 for general use (emails, data URIs, API payloads) or URL-safe (Base64URL) for JWT tokens, URLs, and HTTP headers.

  2. 2

    Enter text or upload a file

    Type or paste text in the Plain Text tab, or switch to File mode and drop any file (up to 50 MB) to encode its binary content.

  3. 3

    Optionally enable line wrap

    Toggle 'Wrap at 76 chars' to insert newlines every 76 characters — required for MIME email attachments and PEM certificate format.

  4. 4

    Copy the Base64 output

    The encoded output updates in real time. Click Copy to copy it to your clipboard.

  5. 5

    Decode it back

    Use the Base64 Decoder tool to verify the output decodes correctly back to the original text or file.

Frequently asked questions

What is Base64 encoding?
Base64 encoding converts binary data (or text) into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is used to safely embed binary data in text-based formats like email (MIME), JSON, XML, HTML data URIs, and HTTP headers.
What is the difference between Standard Base64 and Base64URL?
Standard Base64 (RFC 4648 §4) uses + and / and pads with =. Base64URL (RFC 4648 §5) replaces + with - and / with _, and drops the = padding. Base64URL strings are safe to use in URLs and HTTP headers without percent-encoding — used in JWT tokens and OAuth parameters.
Does this tool support Unicode and emoji?
Yes. Text input is encoded as UTF-8 using TextEncoder before Base64 encoding, so accented characters, CJK text, Arabic, and emoji are all handled correctly.
Can I encode a binary file?
Yes. Switch to File mode, drop any file up to 50 MB, and the tool reads it as raw bytes and encodes the full binary content to Base64. Useful for embedding images in CSS, sending files in JSON APIs, or generating data URIs.
Is my data uploaded to a server?
No. All encoding runs client-side using btoa() for text and FileReader for files. Nothing is sent anywhere.
Are inputs sent to a server?
No. There are zero outbound network requests. Encoding is a local operation using browser-native APIs.
What does the line-wrap option do?
It inserts a newline (\n) every 76 characters in the output, following the MIME specification (RFC 2045). Required for Base64 in email headers, PEM certificates, and some XML formats.
What is the maximum file size for encoding?
There is no hard limit for text input. File encoding supports files up to 50 MB. Larger files may cause slowdowns depending on your device.
How do I create a data URI for an image?
Switch to File mode, upload an image (PNG, JPEG, WebP, etc.), then prepend data:image/png;base64, to the encoded output. The result can be used directly in HTML src attributes or CSS background-image properties.
Why does Base64 output end with == or =?
The = characters are padding. Base64 encodes 3 bytes into 4 characters. If the input is not a multiple of 3 bytes, padding characters are added to complete the final group. Base64URL mode omits this padding.

Encode plain text or binary files to Base64 or Base64URL in your browser,

with no file size limit for text and up to 50 MB for file encoding.

**Standard Base64** (RFC 4648 §4) uses the + / = alphabet. Use it for email

attachments (MIME), data URIs in HTML/CSS, API payloads, and most contexts

where you need to safely embed binary data in ASCII text.

**Base64URL** (RFC 4648 §5) replaces + with -, / with _, and omits = padding.

Safe to embed directly in URLs, HTTP headers, and JWT tokens without

percent-encoding.

**MIME line wrapping** inserts a newline every 76 characters, matching RFC

2045 conventions required by PEM certificate files, email headers, and some

XML formats.

**File mode** accepts any file — drag, drop, or browse — and encodes the

complete binary content to Base64. Files are processed in chunks to avoid

memory issues with large inputs. Character count and byte size are displayed

so you know exactly what you are sending.

All processing is client-side. Files never leave your device.

Related tools

Learn more