Base64 Encoder & Decoder
Encode text to Base64 or decode back. Browser-side, no upload.
Output will appear here…Encode and decode Base64 strings instantly. Browser-side — no upload. Free, no signup.
Base64 Encoder/Decoder is essential for developers working with API tokens, data URIs, JWT payloads, email attachments (MIME), or any system that transmits binary over text-only channels.
Pickrack's Base64 tool runs entirely in your browser using native btoa() and atob() (with proper Unicode handling for non-ASCII text). Tokens, secrets, and data never leave your tab — verifiable in DevTools → Network.
Free, no signup, no rate limit. Supports text mode (paste a string) and file mode (upload up to 10MB to encode binary as Base64).
Key features
- Text mode (instant) — Paste any text — UTF-8 properly encoded for Vietnamese, Chinese, Arabic, emoji. Decode reverses it back.
- File mode — Upload an image or small file (up to 10MB) — get the data URI ready to embed in HTML, CSS, or JSON.
- Auto-detect input direction — Type into either box; the other side updates live. Encode/decode based on which field you're editing.
- Browser-side privacy — btoa/atob are native JavaScript APIs. Zero network calls during encoding — open DevTools to verify.
- URL-safe variant — Toggle URL-safe Base64 (replace +/= with -_) for use in URLs, JWT tokens, or filenames.
How to use
- Step 1: Paste text or drop a file — Type into the input box, or click File mode and drop a file.
- Step 2: Choose direction — Encode (text → Base64) or Decode (Base64 → text). Auto-detected for typical inputs.
- Step 3: Copy the result — One-click copy. Use it in your code, URL, or config.
When to use
- Inspect a JWT payload — copy the middle segment (between dots), Base64-decode to see claims
- Embed a small image as a data URI in CSS or HTML (
url(data:image/png;base64,...)) - Encode credentials for HTTP Basic Auth header (
Authorization: Basic base64(user:pass)) - Decode an email attachment that arrived as Base64 in a raw email source
- Pass binary data through a JSON-only API by Base64-encoding the payload
- Test a webhook that expects Base64-encoded body content
Frequently asked questions
Is my text uploaded?
No. btoa() and atob() are native JavaScript functions running in your browser. Verify in DevTools → Network — no requests fire during encoding/decoding.
Why does it fail for some Unicode characters?
Native btoa() only handles Latin-1. For Unicode text (Vietnamese, Chinese, emoji), Pickrack uses TextEncoder + btoa pattern — full UTF-8 support.
How much data can I encode in one batch?
10MB practical limit. Beyond that, browsers may slow down. Base64 inflates size by about 33%, so a 10MB file becomes roughly 13MB of text.
What's URL-safe Base64?
Standard Base64 uses +, /, = which need percent-encoding in URLs. URL-safe variant replaces them with -, _, no padding. Used in JWT tokens.
Can I decode Base64-encoded files (images, PDFs)?
Yes — paste the Base64 string in decode mode. Output is a binary blob; download as a file. For data URIs, paste only the part after the comma.
Is Base64 encryption?
No. Base64 is encoding — fully reversible without a key. Don't use it to 'hide' secrets. For encryption, use AES via crypto.subtle.
Why does my decoded text look garbled?
Either the Base64 was URL-safe (use URL-safe toggle) or it included padding-related bytes. Some Base64 strings are doubly encoded — try decode twice.
Does this support binary file Base64?
Yes. File mode reads the file as binary and Base64-encodes the bytes. Output is a data URI with mime-type prefix or raw Base64 — your choice.
Related tools
JWT Decoder
Decode JWT header and payload to inspect claims. Validates structure and expiry. Browser-side — tokens never leave your tab.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-512 hashes. Text and file modes. Web Crypto API.
JSON Formatter
Format, validate, and minify JSON. Detects errors with line numbers. Browser-side, your data never leaves your device.