Developer & data utilities

Base64 encode / decode

Encode or decode text and small payloads.

Run Base64 encode / decode online

In-browserDocument processing runs on your device. External resources may still load.

Enable JavaScript to use the interactive tool. Read the instructions, limitations and FAQs below before starting.

Base64 encoding converts binary data (files, images, binary strings) into a printable ASCII text format. This is essential in web development and data transmission contexts where binary data needs to be safely embedded in text-based formats such as JSON, XML, HTML, email bodies (MIME), or URLs.

Base64 decoding reverses this process — converting a Base64-encoded string back to its original binary or text form. Common use cases include decoding JWT tokens (JSON Web Tokens), decoding Base64-encoded API responses, extracting embedded images from data URIs, and decoding encoded email attachments.

Developers encounter Base64 constantly: data URIs for embedding small images in CSS/HTML (data:image/png;base64,...), API authentication tokens, encoding binary payloads for REST APIs that only accept JSON, and email attachment encoding (MIME). This tool provides quick encode/decode without leaving the browser.

How to use this utility

  1. Use the controls below—paste text, pick files, or adjust options as described on the tool.
  2. Click the main action button. Processing runs in your browser on this device.
  3. Download or copy the output. Check the processing note for any external services used by this operation.

Common use cases

  • Decoding a Base64-encoded JWT token to inspect its payload for debugging.
  • Encoding a binary file or image to Base64 for embedding in a JSON API payload.
  • Decoding a Base64 string in an API response to extract the original data.
  • Extracting an embedded Base64 image from a data URI for saving as an image file.
  • Encoding API credentials (client_id:client_secret) to Base64 for an HTTP Basic Auth header.

Tips for best results

  • 1Base64 output is approximately 33% larger than the original input — factor this in if you're using Base64 encoding for size-sensitive transmissions.
  • 2For URL-safe Base64 (used in JWT and some APIs), use the URL-safe variant ('+' → '-', '/' → '_', no padding '=') instead of standard Base64.
  • 3Trailing '=' or '==' in Base64 strings are padding characters — they're required for proper decoding and should not be stripped unless the system you're sending to explicitly handles unpadded Base64.
  • 4If a decoded Base64 string contains garbage characters, the encoded string may have used a different character encoding — try UTF-8 vs ISO-8859-1 decoding.
  • 5For debugging JWT tokens, only the payload section (middle segment between two dots) needs to be Base64-decoded.

Frequently asked questions

Is Konnect2Tools free?
Yes. These in-browser tools are completely free to use with no account required for core functionality.
Do my files leave my device?
Browser document operations run locally, except where the operation uses an external service, such as AI summarisation. Read the processing note before using sensitive inputs.
Is the Base64 encode / decode tool safe to use?
Local operations process document content on your device. External-service operations may send inputs as described in the processing note. Keep originals and inspect the output.
What is Base64 used for in web development?
Base64 is used for encoding binary data in text contexts: embedding small images directly in HTML/CSS via data URIs, encoding file uploads in JSON API bodies, MIME encoding for email attachments, HTTP Basic authentication headers, and JWT token payloads.
Is Base64 a form of encryption?
No — Base64 is encoding, not encryption. It is fully reversible without any key. Anyone can decode a Base64 string to its original content. Do not use Base64 for security or confidentiality — use proper encryption for sensitive data.
What is the difference between standard Base64 and URL-safe Base64?
Standard Base64 uses '+' and '/' characters, which have special meanings in URLs. URL-safe Base64 replaces '+' with '-' and '/' with '_' so the encoded string can be included in a URL or query parameter without percent-encoding.
Why does my Base64 string end with '=' or '=='?
These are padding characters that make the Base64 string length a multiple of 4. They're a normal part of the encoding, not an error. Some implementations strip padding; others require it — match the expectations of the system you're sending to.

Continue with another utility in developer & data utilities.

Explore all categories