WRRK Tools
All toolsBlogWRRK CRM
QR Code Tools
PDF Tools
Image Tools
Developer Tools
India Tools
© 2026 WRRK Tools. Free forever.Built by WRRK — the AI workspace for modern teams.
Tools/Base64 Encoder / Decoder

Base64 Encoder & Decoder

Encode text or files to Base64, decode back, with URL-safe support. Unicode-safe, runs entirely in your browser.

Quick answer

A Base64 encoder converts text or binary data into an ASCII-only string using 64 characters, so it can travel through systems that only accept text — like JSON payloads, URLs, HTML attributes, or email bodies. WRRK's encoder handles UTF-8 correctly, supports the URL-safe variant, and encodes files into data URIs without uploading anything.

Plain text
38 chars
Output
SGVsbG8sIFdSUkshIPCfkYsgRnJlZSwgZmFzdCwgbm8gc2lnbnVwLg==
56 chars

About this tool

WRRK's Base64 encoder and decoder is a fast, browser-only utility that handles both text and files. It uses the standard TextEncoder /TextDecoder APIs so UTF-8 strings — including emoji, Chinese, Arabic, and accented Latin characters — round-trip without corruption. Toggle URL-safe to switch between the standard alphabet (+ / =) and the URL-safe alphabet (- _ with no padding) commonly seen in JWTs and OAuth.

File mode produces a complete data URI likedata:image/png;base64,…ready to paste into HTML, CSS, or Markdown. Everything runs locally — your data never touches a server, which matters when you're handling auth tokens, customer files, or confidential documents. Engineers use it daily to debug API payloads, inline small assets in HTML emails, and inspect JWT segments.

How to use the Base64 encoder (5 steps)

  1. Pick mode. Choose Encode (text → base64) or Decode (base64 → text).
  2. Pick input type. Use Text for plain strings, or File to upload an image, PDF, or document up to 5 MB.
  3. Toggle URL-safe if needed. Enable URL-safe when working with JWTs, OAuth tokens, or query parameters that require - / _ instead of + / /.
  4. Read the output. Output appears live as you type. Decode errors are explained inline.
  5. Copy or download. Click Copy for the clipboard or Download to save the result as a text file.

Use cases

  • Inline images in HTML email or CSS using data URIs
  • Decode the header or payload segment of a JWT (toggle URL-safe)
  • Embed binary files in JSON or XML payloads
  • Encode credentials for HTTP Basic Authorization headers
  • Pass small binary blobs through query strings safely
  • Inspect Authorization: Basic headers from API logs
  • Build OAuth state and PKCE parameters that survive URL encoding

Frequently asked questions

+−What is Base64 encoding?

Base64 represents binary or text data using only 64 ASCII characters (A-Z, a-z, 0-9, +, /, with = padding). It is used to embed images in HTML/CSS, send binary data inside JSON or XML, and pass small payloads through systems that only accept text.

+−Is the data uploaded anywhere?

No. Encoding and decoding happen entirely in your browser using native JavaScript APIs. Your text and files never leave your device — safe for tokens, credentials, and sensitive payloads.

+−What is URL-safe Base64?

Standard Base64 uses + and / which are reserved characters in URLs. URL-safe Base64 replaces them with - and _ and drops the trailing = padding. Toggle 'URL-safe' to encode or decode this variant — common in JWT, OAuth, and HTTP query strings.

+−Why does my decoded text look like garbled characters?

If the original input wasn't UTF-8 text (for example a binary file or a Latin-1 string) it will not display as readable characters. For binary data, use the File tab and download the result as a data URI instead.

+−Does Base64 emoji and Unicode work correctly?

Yes. The tool uses TextEncoder/TextDecoder to handle UTF-8 properly, so emoji, Chinese, Arabic, Devanagari, accented characters, and other multi-byte text encode and decode without corruption.

+−How do I encode an image to Base64?

Switch to the 'File' tab and upload an image. The tool returns a complete data URI like 'data:image/png;base64,iVBOR…' which you can paste directly into HTML <img src=…> or CSS background-image. Max 5 MB to keep it fast.

+−Why do I get an 'Invalid base64' error?

Common causes: extra characters that aren't part of the Base64 alphabet, missing padding, mixing standard and URL-safe variants, or accidentally including a 'data:' prefix. Make sure URL-safe is toggled correctly and remove any 'data:image/...;base64,' prefix.

More free tools

QR Code Generator

URL, WhatsApp, WiFi, UPI, vCard — with logo

WhatsApp Link Generator

wa.me click-to-chat + group invite QR

Image Compressor

Compress to exact KB — for govt forms

Image Resizer

Resize JPG, PNG & WebP by pixels or percentage