Base64 Encoder/Decoder
Encode text or files to Base64 or decode Base64 strings back to plain text — real-time, fully in your browser.
How to use Base64 Encoder/Decoder
-
Choose your direction
Select Encode to convert text or a file to Base64, or Decode to convert a Base64 string back to plain text.
-
Enter or paste your input
Type or paste your text into the input panel. The output updates in real time as you type — no button click needed.
-
Switch encoding mode if needed
Toggle URL-safe Base64 to replace + with - and / with _ — required for Base64 used in URLs, JWT tokens, or query strings.
-
Upload a file for Base64 output
Drop any file onto the input area to encode it as Base64. Useful for embedding images in CSS or HTML data URIs.
-
Copy the result
Click Copy to copy the encoded or decoded output to your clipboard with one click.
Base64 Encoder/Decoder FAQ
What is Base64 encoding used for?
Does this support Unicode and emoji?
What is URL-safe Base64?
Is my data uploaded anywhere?
What happens if I paste invalid Base64?
Can I encode a file to Base64?
Can I use this to decode JWT tokens?
What is the difference between Base64 and Base64url?
Is there a size limit for encoding?
Background
Base64 Encoder & Decoder handles both directions instantly. Encode any plain text, Unicode string, or binary file to standard or URL-safe Base64, or decode a Base64 string back to its original form. Full UTF-8 support via TextEncoder and TextDecoder means emoji, accented characters, CJK scripts, and other non-ASCII text are handled correctly — no mojibake, no surprises.
Switch between standard Base64 (RFC 4648) and URL-safe Base64 (replaces + with - and / with _) with a single toggle. Paste text directly or drop a file to get its Base64 representation for embedding in HTML, CSS, JSON payloads, or data URIs. The output updates in real time as you type — no button clicks required.
All encoding and decoding runs client-side using native browser APIs. Nothing is uploaded, logged, or transmitted. Ideal for inspecting JWTs, building data URIs, encoding email attachments, or debugging API payloads that use Base64 encoding.
Related tools
JWT Decoder
Decode and inspect JWT tokens — view header, payload, claims, and expiry status without sending data to any server.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from text or files instantly in your browser.
JSON Formatter
Format, validate, and minify JSON instantly — with configurable indentation, error location, and tree view.
UUID Generator
Generate cryptographically secure v4 and v7 UUIDs in bulk — copy individually or all at once, instantly in your browser.
Base64 Encoder
Encode text or binary files to Base64 or Base64URL. Supports MIME line wrapping, data URIs, and files up to 50 MB. Fully browser-based.
Base64 Decoder
Decode Base64 or Base64URL strings to plain text or download as a binary file. Handles MIME line-wrapping and PEM certificates automatically.
Learn more
Base64 Encoding Explained: How It Works and Why
Visual step-by-step guide to Base64 encoding. See how text becomes a 6-bit alphabet used in data URIs, JWTs, and email. Adds ~33% size overhead.
developerAPI Authentication Methods Compared: OAuth, JWT, API Keys
Compare API authentication methods with real HTTP examples. OAuth 2.0, JWT, API keys, and session tokens explained. 78% of breaches involve weak auth.
developerCharacter Encoding Explained: UTF-8, ASCII, Unicode
UTF-8, ASCII, and Unicode explained with byte-level examples. Learn why mojibake happens, how to fix encoding issues, and why UTF-8 powers 98.2% of the web.