Monu Tools

Mã hóa & giải mã Base64

Mã hóa văn bản sang Base64 hoặc giải mã Base64 về văn bản. An toàn UTF-8 với tự động nhận diện hướng.

Cách dùng Mã hóa Base64

  1. 01

    Gõ văn bản để mã hóa, hoặc dán Base64 để giải mã.

  2. 02

    Nhấn Chạy. Hướng được nhận diện tự động.

  3. 03

    Sao chép kết quả từ ô đầu ra.

What Base64 is

Base64 represents binary or text data using just 64 printable ASCII characters (A-Z, a-z, 0-9, plus + and /), encoding every three bytes as four characters. That keeps data intact when it travels through systems that were built for text rather than raw bytes.

Where you see it

You see it everywhere: data URLs that embed an image directly in HTML or CSS, email attachments (MIME), the header and payload of a JSON Web Token, HTTP Basic authentication headers, and many API fields that need to carry binary data as a plain string.

How this tool handles it

This tool encodes text to Base64 and decodes Base64 back to text, choosing the direction automatically. It is UTF-8 safe, so accents, emoji and other Unicode characters survive the round trip without corruption, which the naive built-in browser functions do not guarantee on their own.

Encoding is not encryption

It is important to know what Base64 is not: it is an encoding, not encryption. Anyone can decode it instantly, so it provides zero security. Never use it to hide passwords, tokens or secrets. Its job is safe transport and representation, not confidentiality.

The size cost

Base64 also has a size cost. The encoded output is about 33 percent larger than the original, because four characters stand in for every three bytes. That trade-off is usually worth it for compatibility, but it is why you would not Base64-encode large files when a real binary channel is available.

Runs in your browser

Everything runs in your browser, so the text you paste is never uploaded. To turn an image file into a Base64 data URL instead of plain text, use the dedicated Image to Base64 tool.

Câu hỏi thường gặp

Tự động nhận diện hoạt động thế nào?

Nếu dữ liệu nhập trông giống Base64 hợp lệ và giải mã ra văn bản UTF-8 đọc được, nó sẽ được giải mã; ngược lại nó sẽ được mã hóa. Điều này bao quát các trường hợp phổ biến mà không cần chuyển thủ công.

Nó có an toàn cho ký tự không phải tiếng Anh không?

Có. Mã hóa và giải mã an toàn UTF-8, nên emoji, dấu và các ký tự Unicode khác chuyển đổi qua lại đúng cách.

Tôi có thể bảo vệ mật khẩu hay bí mật bằng cái này không?

Base64 là một dạng mã hóa biểu diễn dữ liệu, không phải mã hóa bảo mật. Nó dễ dàng bị đảo ngược và không cung cấp bảo mật nào. Đừng bao giờ dùng nó để bảo vệ dữ liệu nhạy cảm.

Nguồn

Nhúng công cụ này

Thêm công cụ này vào trang web của riêng bạn. Sao chép đoạn mã bên dưới; nó tự động cập nhật.

<iframe src="https://monu.tools/embed/vi/base64-encoder" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

Công cụ liên quan