Base64 Encoder and Decoder Online | UTF-8 and URL-Safe Text

EncodingRuns in Your Browser (No Uploads)

Encode text to Base64 or decode Base64 back to readable text in your browser. Supports UTF-8, Base64URL-style debugging, Data URI workflows, copy/download output, and no-upload privacy.

Loading…

What to do next

Continue with a related workflow or open the next tool that usually follows this task.

How to Use This Tool

  1. 1

    Choose Encode (text → Base64) or Decode (Base64 → text).

  2. 2

    Paste or type your input; Live mode updates instantly (use Manual for large data).

  3. 3

    Copy the output or download it as a .txt file.

  4. 4

    Use Swap to send output back to input and switch modes fast.

  5. 5

    For Data URIs, prepend a prefix like data:text/plain;base64, to the encoded result.

When to Use This Tool

API Payload and Webhook Debugging

Encode Unicode strings into ASCII-safe Base64 for webhook payloads, JSON fields, and text-only API parameters.

Decode Base64 from Logs and JSON

Decode encoded values from logs or responses before comparing the original JSON, token, or message body.

Data URIs for Embedded Assets

Inline small images or assets with data:image/png;base64,... when a tiny self-contained snippet is more useful than a separate file.

JWT & Web Auth Debugging

Inspect Base64URL-encoded headers/payloads in JWTs during development.

Text-Only Storage and Configs

Store non-secret binary or Unicode values in config files, environment examples, or text-only systems.

Common Mistakes

Treating Base64 as security

Base64 is reversible encoding, not encryption. Do not use it to hide passwords, API keys, tokens, or private data.

Mixing standard and URL-safe Base64

Standard Base64 and Base64URL use different characters for URLs and JWTs; confirm padding and character rules before pasting into an API.

Encoding large files into text fields

Base64 grows data by about one third, so embedding large files can make JSON, HTML, emails, or config files heavy.

Examples

Encode UTF-8 text for an API payload

Unicode text becomes ASCII-safe Base64 for APIs, message queues, or config systems that expect text-only values.

Input
Hello, 안녕하세요, 👋
Output
SGVsbG8sIOyViOuFle2VmOyEuOyalCwg8J+Riw==

Decode a Base64 value from a JSON response

Decode an encoded JSON field before inspecting its original value in a bug report, webhook, or API response.

Input
eyJzdGF0dXMiOiJvayIsInJvbGUiOiJhZG1pbiJ9
Output
{"status":"ok","role":"admin"}

What is Base64?

Base64 represents binary data with 64 ASCII characters; '=' padding keeps output length aligned to 4-character blocks (RFC 4648).

Encoding processes every 3 input bytes as 4 Base64 characters, increasing size by roughly one third.

Base64URL is the URL-safe variant used by JWTs and web protocols; Base64 itself is still not encryption.

Frequently Asked Questions

Q.Is Base64 encryption? Is it secure for protecting sensitive data?

A. No. Base64 is encoding, not encryption. Anyone can decode it. Use HTTPS for transport security and real cryptography for confidentiality.

Q.Why does Base64-encoded data appear larger than the original?

A. Encoding maps 3 bytes to 4 Base64 characters (≈33% increase) and uses '=' padding to make the length a multiple of 4.

Q.Can I encode Korean, Chinese, emojis, or special characters?

A. Yes. UTF-8 support handles all Unicode correctly, including Korean, Chinese, emojis, and accented letters.

Q.Can I encode files (images, PDFs, documents) to Base64?

A. This tool is optimized for text. For binary files, use a file-to-Base64 workflow or a Data URI generator and avoid embedding very large files in JSON or HTML.

Q.What is the difference between Base64 and Base64URL?

A. Base64URL replaces '+' and '/' with '-' and '_' and often omits '=' padding. JWT header and payload parts use Base64URL, so standard Base64 strings may need conversion before use in URLs.

Related workflow guides

Use these focused guides when you need a practical workflow before opening the tool.

Related Tools

Explore more developer tools

Browse All Tools