Encode and decode Base64 strings, files, and data URIs instantly.
Free online Base64 encoder, decoder, and binary data converter. Easily encode raw text or upload binary files to standard Base64 (RFC 4648 §4) and URL-safe Base64 (RFC 4648 §5) for JWTs and web URLs. Decode Base64 strings back to clean UTF-8 text, ASCII, or downloadable binary files. Convert between Base64 and hexadecimal, wrap output lines at 76 characters for RFC 2045 MIME compliance, and generate ready-to-use HTML/CSS Data URIs for images, fonts, and assets. Processes everything 100% client-side in your browser with zero server transmission for absolute privacy.
Keywords: base64 encoder, base64 decoder, base64 encode online, base64 decode online, base64 to text, text to base64, base64 file, data uri generator, base64 image, url safe base64, base64 to hex, base64 converter, base64 online, encode base64, decode base64, rfc 4648 encoder, base64url decoder, binary to base64
Tags: base64, encode, decode, binary, data-uri, url-safe, rfc4648
Base64 Encode/Decode is also known as: Base64 Encoder, Base64 Decoder Online, Base64 to Text Converter, Text to Base64, URL Safe Base64 Converter, Base64 to Image Data URI, Base64 to Hex Converter, Base64 Binary File Converter.
Paste raw text, code snippets, or hexadecimal strings into the input editor, or drag and drop any binary file (image, font, document) directly into the upload area.
Choose your target operation: "Encode" to convert raw data to Base64, "Decode" to restore original text or binary files, "Data URI" to create inline embed strings, or "To Hex" / "From Hex" for byte inspection.
Configure encoding options: enable "URL-Safe" (RFC 4648 §5) to produce query-safe strings for JWTs, or "Line Wrap" (RFC 2045) to split long outputs into 76-character blocks for MIME email compatibility.
Select the character encoding charset (UTF-8, ASCII, or ISO-8859-1 / Latin-1) to ensure proper byte-level multi-byte character representation.
Click "Encode" or press ⌘↵ (Ctrl+Enter on Windows/Linux) to execute the transformation instantly with live byte-size statistics and overhead ratios.
For image files or SVG graphics, inspect the automatic inline visual preview rendered below the output panel upon decoding.
Use the "Data URI" mode to generate complete `data:[mime];base64,...` strings for direct embedding in CSS `background-image` rules or HTML `<img>` elements.
Copy the converted result to your clipboard with ⌘⇧C, download the output as a standalone file, or generate a gzip-compressed shareable URL for team debugging.
Standard RFC 4648 §4 Base64 Engine: High-performance client-side encoding and decoding with full UTF-8 Unicode and emoji support.
URL-Safe Base64 (Base64URL): Converts standard `+` and `/` characters to `-` and `_` and strips trailing `=` padding for JWTs and URL parameters.
Data URI Generator: Automatically detects MIME types from binary magic bytes (PNG, JPEG, GIF, WebP, SVG, PDF, WOFF2) to assemble `data:[mime];base64,...` embed strings.
Hexadecimal Bi-Directional Conversion: Convert between raw hexadecimal byte sequences and Base64 representations for cryptographic and low-level debugging.
MIME RFC 2045 Line Wrapping: Formats Base64 output into 76-character line segments with CRLF delimiters for SMTP email gateways and PEM certificates.
Multi-Charset Decoding Support: Decode Base64 byte arrays using UTF-8 (default), 7-bit ASCII, or Western European ISO-8859-1 (Latin-1) standards.
Binary File Upload & Download: Drag-and-drop any binary file up to multi-megabyte sizes to generate Base64 strings, or decode Base64 back into downloadable binary files.
Live Byte Metrics & Overhead Ratio: Real-time calculation of input byte length, output byte length, and exact encoding expansion multiplier (~1.33x).
Automatic Format Detection: Intelligent heuristic detector analyzes input syntax and prompts one-click decoding when Base64 content is detected.
Visual Image & Media Previews: In-browser visual rendering for decoded image formats (PNG, JPG, WebP, SVG, GIF) and font assets.
Gzip-Compressed Shareable Links: Compresses inputs into shareable URL parameters for seamless peer code review and collaborative debugging.
100% Client-Side In-Memory Execution: All processing runs locally in browser memory via native TextEncoder/TextDecoder APIs with zero server transmission.
Developer Keyboard Shortcuts: Boost productivity with ⌘↵ (Run), ⌘⇧E (Force Encode), ⌘⇧D (Force Decode), ⌘⇧K (Clear), and ⌘⇧C (Copy).
REST API & Headless Execution: Programmatically encode and decode Base64 payloads via HTTP POST /api/tools/base64.
The Base64 Encode/Decode supports 6 syntax formats and dialects for accurate parsing and processing.
Transform raw cURL commands and browser network exports into production-ready JavaScript Fetch, Axios, Python Requests/HTTPX, and Go net/http code.
Master cryptographic hashing: evaluate collision resistance, benchmark SHA-2 vs SHA-3 vs BLAKE2, prevent length extension attacks with HMAC, and safely verify file checksums.
A comprehensive developer debugging guide to resolving JSON Web Token (JWT) errors: signature mismatches, expired tokens, alg: none attacks, clock skew, and JWKS key rotation.
A comprehensive developer guide to positional numeral systems, arbitrary-precision BigInt radix conversions, two's complement signed arithmetic, and IEEE 754 float inspection.
Benchmark memory-hard Argon2id against bcrypt and PBKDF2, configure work factors for modern GPU resistance, avoid the 72-byte bcrypt truncation trap, and implement seamless on-login hash upgrades.
A developer guide to Protocol Buffers wire format, decoding varints, resolving tag mismatches, and debugging corrupt binary gRPC and Kafka streams.
Base64 is a binary-to-text encoding algorithm that converts binary data into an ASCII string using 64 printable characters as defined in RFC 4648.
JWT claims are statements about an entity (typically a user) and additional metadata serialized as key-value pairs inside a JSON Web Token payload.
OAuth 2.0 (RFC 6749) is the industry-standard authorization protocol that enables third-party applications to obtain scoped access to HTTP resources on behalf of a user.
PKCE (RFC 7636) is an OAuth 2.0 security extension that protects public and confidential clients against authorization code interception attacks using SHA-256 challenges.
URL encoding (percent-encoding) is an RFC 3986 mechanism that converts reserved or unsafe characters in a URI into a percent sign followed by two hex digits.
WebAuthn is a browser API that enables public-key cryptographic authentication, powering phishing-resistant passwordless sign-ins and passkeys.
Chain Base64 Encode/Decode with other utilities in a multi-step visual workflow.
Decode a Base64 string and pretty-print the JSON inside it.
Multi-stage conversion for transport encoding.
Beautify SQL queries and encode for storage.