Home All Tools About Contact
100% client-side  ·  Files never leave your device  ·  No server, no storage, no tracking
Detecting…
Plain Text
Base64
Image Preview
Preview
Input size
bytes
Output size
bytes
Size change
overhead
Valid Base64
Size Comparison
Input— bytes
Output— bytes
Base64 encoding adds approximately 33% overhead — every 3 bytes of input become 4 bytes of Base64
Options
URL-safe Base64
Replaces + with - and / with _ · Removes = padding · Safe in URLs and filenames
MIME line wrapping
Inserts line break every 76 characters · Required by MIME/email standards
Strip whitespace from input
Removes spaces, tabs, and line breaks before decoding · Useful for pasted Base64

Common Base64 Use Cases

Use CaseExample / FormatVariantNote
Image data URIdata:image/png;base64,iVBORw0K…StandardEmbed images inline in HTML/CSS
JWT tokenseyJhbGciOiJIUzI1NiJ9.eyJzdWI…URL-safeHeader.Payload.Signature, no padding
HTTP Basic AuthAuthorization: Basic dXNlcjpwYXNzStandardusername:password encoded
Email attachmentsContent-Transfer-Encoding: base64MIME (76-char wrap)MIME email standard requires line breaks
CSS/HTML data URIsbackground: url(data:image/svg+xml;base64,…)StandardInline fonts, icons, small images
API file upload{"file": "JVBERi0xLjQ…"}StandardSend binary files in JSON payloads
URL query params?data=SGVsbG8tV29ybGQURL-safeAvoids + and / breaking URL parsing
Cookie valuesSet-Cookie: session=dG9rZW4…URL-safeSafe characters for cookie storage

Related Tools

CSV to JSON Password Generator Case Converter

How to encode and decode Base64 online

Encoding or decoding Base64 with Rai Paruhang takes seconds — no account, no upload, and nothing installed. Here is everything you need to know, including image conversion and device-specific tips.

  1. 1

    Paste text or upload a file

    Type or paste text directly into the input box, or drag and drop an image (JPG, PNG, SVG) to convert.

  2. 2

    Choose Encode or Decode

    Switch to Encode if you're starting from text or an image, or Decode if you already have a Base64 string you want to convert back.

  3. 3

    Copy or download the result

    Copy the Base64 string with one click, or preview and download the decoded image. Everything happens inside your browser — nothing is sent to any server.

How to encode text to Base64

Type or paste any text into the input box and click Encode. The Base64-encoded string appears instantly below — click the copy icon to grab it for use in code, JSON, or a data URI.

How to decode Base64 to text

Paste your Base64 string into the input box and click Decode. The original text is restored immediately — useful for reading API payloads, JWT segments, or encoded config values.

How to convert an image to Base64

Drag and drop a JPG, PNG, or SVG file into the upload area. The tool generates a ready-to-use Base64 data URI, which you can paste directly into your HTML or CSS to embed the image without a separate file request.

How to convert Base64 back to an image

Paste your Base64 string — with or without the data:image/png;base64, prefix — and click Decode. A live preview of the image appears, and you can download it as a file with one click.

How to encode or decode Base64 on Mac, Windows, iPhone, or Android

This tool works in any modern browser — Safari and Chrome on Mac, Chrome or Edge on Windows, Safari on iPhone, or Chrome on Android. There is nothing to install. On mobile, you can upload images directly from your Photos app or local storage, and downloaded files save to your device just like any other download.

How to encode or decode Base64 without uploading files

Unlike many Base64 tools, this one never sends your text, images, or files to a server. All encoding and decoding happens locally in your browser using JavaScript — making it safe for sensitive data, API keys, or private images. It even keeps working offline once the page has loaded.