inyourbrowser.com

Base64 Encoder / Decoder

Base64 encoder and decoder is a data tool that converts UTF-8 text to Base64 and back. It encodes emoji and non-Latin scripts correctly, accepts URL-safe and unpadded input when decoding, and has dedicated pages that turn files up to 10 MB into Base64 strings or image data URIs. The tool runs in your browser.

Plain text
Base64

BASE64

Converts UTF-8 text to Base64 encoding. Handles Unicode characters correctly.

Runs entirely in your browser

How to encode or decode Base64

  1. Choose Encode or Decode.
  2. Paste the text to encode, or the Base64 to decode, into the input area.
  3. The result appears instantly in the output area.
  4. Click "Copy" to copy the encoded or decoded result to your clipboard.

Common uses

  • Encoding binary data (images, files) as Base64 for embedding in JSON or HTML
  • Decoding Base64-encoded strings from APIs, JWTs, or data URIs, use JWT decoder to inspect full token claims
  • Checking what data is stored inside a Base64-encoded field, pair with URL encoding when transmitting in query strings

Technical specification

  • Algorithm or formula: Standard Base64 encoding per RFC 4648. Text mode wraps the browser primitives in a UTF-8 safe layer so non-ASCII characters round-trip correctly.
  • Browser API or library: Native btoa and atob combined with TextEncoder and TextDecoder for UTF-8. File mode uses FileReader.readAsDataURL.
  • Input limits: Files capped at 10 MB to keep encoding instantaneous. Text input is bounded by available browser memory.
  • Output: Plain Base64 string for text and files, or a full data URI (data:{mime};base64,...) for images.
  • Known limitations: Base64-url (with - and _) is decoded automatically but not produced. Output is not chunked into 76-character lines (MIME variant).

Frequently asked questions

What is Base64 encoding used for?
Base64 converts binary data into a text-safe format. It is commonly used in email attachments, data URIs, JWTs, and API payloads to transmit binary data as plain text.
Is my data sent to a server?
Encoding and decoding happen entirely in your browser. Our servers are not involved at any point.
Does Base64 encrypt my data?
Base64 is an encoding scheme, not encryption. Anyone who receives the Base64 string can decode it instantly. Do not use it to hide sensitive information.
Can I encode files, not just text?
Yes. Use the File to Base64 page to get a file's Base64 representation, or Image to Data URI for a data URI you can embed in CSS or HTML.

Related tools

URL encode / decode
Percent-encode and decode URLs, or parse query strings into key-value pairs.
Hash generator
Generate SHA-256, SHA-512, SHA-1, and MD5 hashes. Verify file checksums locally.
Image to Base64
Convert any image to a Base64 data URI. Copy directly into HTML, CSS, or JSON.
JWT decoder
Decode JWT header and payload instantly. All inspection runs in your browser.

Reviewed and tested September 30, 2026.