Base64 線上解碼與編碼

在左邊輸入或貼上文字即可編碼,或在右邊貼上 Base64 即可解碼。轉換在瀏覽器中即時完成,不會上傳任何資料。

  • 在本機執行,不上傳任何資料
  • 免註冊
  • UTF-8 及 35 種以上字元集
  • 全部 8 種 Base64 標準

編碼為 Base64

所有編碼工具

Base64 解碼

所有解碼工具

開發者工具

All developer tools

為什麼選擇這個 Base64 轉換器?

  • 隱私至上的設計。您的文字和檔案都在本機以 JavaScript 處理,即使是大型或機密檔案也不會離開您的裝置。
  • 處理真實世界的 Base64。自動接受 Data URI、換行、URL 安全字元及缺少的補齊字元,錯誤訊息會精確指出出錯的字元。
  • 支援所有標準。標準 RFC 4648、Base64URL、MIME、PEM、IMAP、XML 及 OpenPGP armor。
  • 支援所有字元集。UTF-8、UTF-16、Windows-125x、ISO-8859-x、Shift_JIS、GBK、Big5、EUC-KR、KOI8 等。
  • 可直接貼上的輸出。取得 Data URI、CSS 規則、HTML 標籤、JSON 或 XML 程式碼片段,而不只是純字串。

Base64 decode and encode for developers

Developers use Base64 every day: embedding images in CSS and HTML, shipping binary in JSON APIs, reading JWTs, attaching files in MIME e-mail, and storing keys in PEM certificates. This free online Base64 decoder and encoder is built for that workflow—fast, accurate across standards, and private by default.

  • Decode Base64 to text or file with automatic standard and charset detection, plus image/PDF/audio/video preview.
  • Encode text, files or URLs to Base64 with UTF-8 and 35+ character sets, MIME line wrapping and Base64URL.
  • Validate, repair and normalize messy Base64 from logs, e-mail and copy-paste with dedicated developer tools.
  • Language guides for JavaScript, Python, Java, Go, PHP, C#, Node.js and Bash so you can match what your code produces.

Developer & IT toolkit (daily corporate searches)

Engineers live in browser tabs: regex on logs, cron next-runs, config diffs, CIDR math, YAML↔JSON for Kubernetes. All of these run locally here—safe when policy forbids pasting secrets into random SaaS.

  • Regex tester — live highlight + presets (email, IP, UUID).
  • Cron explainer — plain English + next fire times.
  • Diff checker — compare configs / API responses privately.
  • CIDR subnet calculator — VPC and firewall planning.
  • YAML ↔ JSON — K8s, GitHub Actions, Ansible.

Regex tester · Cron explainer · Diff checker · Subnet calculator · YAML ↔ JSON · Dev/IT guide

Christmas 2026: Secret Santa & countdown (high season)

From November through Christmas Eve, millions search for Secret Santa generators and “days until Christmas.” Draw Amigo Secreto privately with Base64URL links—no email signup—and keep a live countdown on your device.

  • Secret Santa / Amigo Secreto — fair draw, couple exclusions, pass-the-phone or private WhatsApp links.
  • Christmas countdown — how many days until Dec 25 in your timezone.

Secret Santa generator · Christmas countdown · Christmas traffic guide

Save bandwidth: compress before Base64

Where mobile data is expensive—Brazil, LATAM and other prepaid markets—uploading a huge photo just to shrink it wastes the plan. Compress locally first, then encode or share once.

  • Compress images to WebP/JPEG in your browser, see % saved, then download or copy Base64—no upload.
  • Gzip text or JSON before Base64 for APIs; decompress payloads you receive.
  • Private by design — Canvas and CompressionStream run on your device.

Compress image · Gzip compress · Compress before Base64 · Save mobile data guide

Private media tools (not social downloaders)

We will not scrape Instagram, LinkedIn, Pinterest or Kuaishou. We do help you prepare files you already own: convert HEIC/WebP, merge PDFs, cut out backdrops, build favicons—entirely in the browser.

  • HEIC / WebP / SVG converter — iPhone photos and WebP downloads without uploading to Adobe/Canva-style sites.
  • Merge PDF — combine contracts or turn images into a PDF locally (no Smallpdf upload).
  • Remove background from product shots and logos (solid/near-solid backdrops).
  • Favicon generator — PNG sizes, HTML tags and webmanifest, plus Base64 copy.

Image converter · Merge PDF · Remove background · Favicon generator · HEIC & WebP guide

Built from real Reddit gaps (not Base64-only)

Users on Reddit keep asking for tools that never upload files: strip GPS EXIF, hash checksums, JSON formatters without ads, QR codes without tracking short links. We ship those here—private, free, and ranked for EU and US search.

  • Strip EXIF before posting photos.
  • Hash, JSON, UUID, timestamp, password, QR — everyday utilities that stay on-device.

Strip EXIF · Hash generator · JSON formatter · QR generator · Reddit gap write-up

Base64 reader: paste and see

Need a live Base64 viewer? Paste a string or data URI and read the result immediately—text, image, PDF or hex—or get Base64 output as you type plain text. No Decode click required.

Base64 reader · Why live readers win

Built for the AI era

ChatGPT and Claude often invent Base64 that looks right but is wrong. AI agents double-encode payloads and burn context on huge Base64 blobs. This site’s principle: never trust a model to be the encoder—verify with a real tool in your browser.

  • Verify Base64 from LLM output with round-trip checks before you ship a header or JWT.
  • Unwrap nested Base64 when an agent or gateway encoded twice.
  • URL encode/decode beside Base64URL for safe query strings.
  • Principles for agents and MCP: deterministic tools, privacy, right dialect, watch token cost.

Verify Base64 · Unwrap nested Base64 · AI agent guide · Why ChatGPT fails at Base64

Advanced options

  • Character set. Base64 encodes bytes. Choose UTF-8 (default) or a legacy charset before encoding, or auto-detect when decoding text.
  • Live mode. Enable “Convert as I type” to encode or decode instantly in the browser with no round-trip to a server.
  • URL-safe Base64 (Base64URL). Use the Base64URL encoder/decoder for JWTs, tokens and filenames without escaping "+" or "/".
  • MIME and PEM wrapping. Split lines at 76 or 64 characters when a mail client, certificate or OpenPGP tool expects wrapped output.
  • Per-line encoding. On the text encoder, encode each line separately when you have multiple independent values.

Safe, free and private

All conversions run over HTTPS. Text and local files are converted in your browser with JavaScript—they are not uploaded or stored. The site is free to use with no account and no software to install. Optional remote URL fetching and a few network tools use our API; those responses are not kept for inspection.

30 秒了解 Base64 原理

Base64 每次取三個位元組(24 位元),分成四組各 6 位元,再將每組對應到 64 個字元之一。例如單字 Man(位元組 77 97 110)會變成 TWFu。閱讀逐步演算法說明,或從什麼是 Base64?開始。

Common uses include MIME e-mail attachments, data URIs in HTML and CSS, binary fields in JSON or XML, HTTP Basic authentication, and PEM-encoded certificates. When you need the reverse path, use Base64 decode online; to produce Base64 from scratch, use Base64 encode online.

常見問題

什麼是 Base64?

Base64 是一種只用 64 個可列印字元(A–Z、a–z、0–9、"+" 和 "/")來表示二進位資料(圖片、檔案、任何位元組)的方法。它讓二進位資料能安全地通過 JSON、HTML、電子郵件和網址等只處理文字的系統。

How do I decode Base64 online?

Paste your Base64 string into the right box (or open the Base64 Decode page) and click Decode. Live mode updates as you type. Data URIs, line breaks and URL-safe characters are accepted automatically.

How do I encode text or a file to Base64?

Type text on the left and click Encode, or open Base64 Encode and choose Text, Local file or Remote URL. You can pick UTF-8 or 35+ character sets and eight Base64 standards including MIME and Base64URL.

Base64 是加密嗎?

不是。Base64 是編碼而非加密,任何人不需金鑰就能解碼,所以絕不要用它來隱藏密碼或機密資訊。

我的檔案會上傳到你們的伺服器嗎?

不會。編碼和解碼完全在您的瀏覽器中執行。只有選用的「從網址載入」功能和少數網路工具會使用我們的伺服器,且不會儲存任何資料。

為什麼 Base64 輸出比輸入大?

每 3 個位元組會變成 4 個字元,因此 Base64 約比原始資料大 33%,另外最多再加兩個 "=" 補齊字元。

結尾的 "=" 是什麼意思?

那是補齊字元。當輸入長度不是 3 的倍數時,會用一或兩個 "=" 填滿最後一組 4 個字元。

What is Base64URL?

Base64URL (RFC 4648 §5) replaces "+" with "-" and "/" with "_" and often omits "=" padding so the string is safe in URLs, filenames and JWTs without percent-encoding.

Which character set should I use?

Use UTF-8 unless the receiving system requires a legacy encoding. The same text produces different Base64 in UTF-8, Windows-1252 or Shift_JIS because Base64 encodes bytes, not letters.

留言 (0)

對「Base64 線上解碼與編碼」有問題、想法或發現錯誤嗎?歡迎留言、為工具評分或回覆他人。

目前還沒有留言,歡迎搶先分享您的意見!

發表留言

為此工具評分:
Esc
↑ ↓ 移動↵ 開啟Esc 關閉