Mentigo Icon
MentigoInstrument deck
deck Data & Code Utilities Base64 Encoder / Decoder
Back to deck
Data & Code Utilities

Base64 Encoder / Decoder

Encode strings and binary images to Base64 format or decode them back safely.

Runs privately in your browser — your input is never uploaded or tracked.

Base64 Encode and Decode Online — Text & Images

Encode text to Base64 or decode Base64 strings back to readable text instantly with this free online Base64 encoder and decoder. It also converts images to Base64 data URIs for embedding directly in HTML, CSS, or JSON — all processed locally in your browser with no upload and no server round trip.

Base64 is everywhere in web development: HTTP Basic Auth headers, JWT segments, data URIs, email attachments (MIME), and API payloads that need binary-safe transport. This tool handles UTF-8 text correctly in both directions, so emoji, accents, and non-Latin scripts encode and decode without corruption.

How to Encode or Decode Base64

  1. Choose your direction

    Select Encode to convert plain text or an image to Base64, or Decode to turn a Base64 string back into its original form.

  2. Paste text or upload an image

    Type or paste your input, or drop an image file to generate a Base64 data URI.

  3. Get the result instantly

    The conversion happens live as you type — no button mashing required.

  4. Copy the output

    Copy the encoded or decoded result to your clipboard with one click.

Why Use This Base64 Converter?

  • Two-way conversion

    Encode and decode in the same tool — switch direction instantly without losing your input.

  • Image to Base64 data URI

    Convert PNG, JPEG, SVG, and other images into data URIs ready to embed in CSS or HTML.

  • Full UTF-8 support

    Unicode text, emoji, and international characters encode and decode correctly, avoiding the classic btoa() pitfalls.

  • No upload, no logging

    Everything is converted in your browser, so secrets and credentials never touch a server.

  • Handles long strings

    Paste large Base64 blobs — embedded fonts, images, certificates — without size limits.

Frequently Asked Questions

What is Base64 encoding used for?

Base64 converts binary data into safe ASCII text so it can travel through systems designed for text: JSON payloads, HTML data URIs, email attachments, HTTP headers, and configuration files.

Is Base64 encryption?

No. Base64 is an encoding, not encryption — anyone can decode it. Never use Base64 alone to protect secrets; it only makes binary data text-safe.

How do I convert an image to Base64?

Upload or drop the image into the tool and it generates a Base64 data URI you can paste into a CSS background-image or an HTML img src attribute.

Why does my decoded Base64 look garbled?

The string may be URL-safe Base64 (using - and _ instead of + and /), truncated, or represent binary data rather than text. Check that you copied the complete string.

Is it safe to decode tokens here?

Yes. Decoding runs entirely client-side in your browser — the string is never transmitted anywhere.