B64
Developer/Base64 Encoder / Decoder

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 strings. 100% local — no server calls.

100% LOCALUTF-8 safeURL modeNo uploadInstant
Input
Output
Output will appear here
Data Source & Legal Disclaimer
Effective: 2026
Sources: Browser-side processing (no external API)

This tool runs 100% in your browser. All computation happens locally on your device — your input is never uploaded to any server. Results are for reference only.

See all data sources & update policy →
Privacy, verified
checking…

Base64 encoding happens entirely in your browser with plain JavaScript — your text never leaves this page.

Request count is measured live from your browser's performance log — it cannot be faked. External resources were loaded — see the data-source note below.

How Base64 encoding works — illustrated

Base64 turns binary bytes into safe ASCII text. Every 3 bytes (24 bits) become 4 Base64 characters taken from a 64-symbol alphabet.

Example: 'Man' → 'TWFu'
1 · RAW BYTESM01001101a01100001n011011102 · SPLIT 24 BITS INTO 6-BIT GROUPS0100110101100001011011103 · DECIMAL INDEX19225464 · BASE64 OUTPUTTWFu

Each 6-bit group indexes the 64-character alphabet (A–Z, a–z, 0–9, +, /). Output length is padded with '=' to a whole multiple of 4. Encoding is reversible and lossless.

Instant check

Encode the word Hello in this tool, or scroll up to try it — you should get SGVsbG8=.

  1. Text:Hello
  2. Base64:SGVsbG8=
  3. Length:8 chars (via 3-byte groups + padding)
Common Base64 questions
↩ Back to encoder

Base64 encoding converts binary data to ASCII text. Paste your text or Base64 string and the tool instantly encodes or decodes it — no data leaves your browser.

FreeToolHub Base64 Encoder/Decoder is a free browser-based tool that encodes text to Base64 or decodes Base64 to text, UTF-8 safe, no signup.

About this tool

What is this tool?

Encode and decode Base64 with full UTF-8 support and URL-safe variant. 100% browser-based, no upload, no signup, free.

UTF-8 safeURL modeNo uploadInstant

What Is the Base64 Encoder / Decoder?

This tool converts text to Base64 and back with full UTF-8 support, so emoji, Chinese, and every other script encode and decode correctly instead of turning into question marks. It offers the standard alphabet plus the URL-safe variant that swaps + and / for - and _, which is what tokens in URLs require. Bidirectional operation means the same box handles encoding payloads for data URLs, basic auth headers, and JWT segments, and decoding values pulled back out of logs and configs. All conversion runs locally — credentials and tokens never leave the machine.

Who Should Use This Tool?

Web developers build data URLs for inline images and fonts, or decode the payload segment of a JWT without a full decoder. API users construct HTTP Basic Authentication headers, which are Base64 of user:pass, and inspect decoded values from response bodies. Email engineers handle MIME-encoded attachments and subjects. Anyone copy-pasting between systems that mangle binary or Unicode uses Base64 as a lossless transport. Security-conscious users benefit most: local conversion means API secrets stay off shared servers.

How Does It Work?

(1) Choose encode or decode direction. (2) Paste your text — the tool handles multi-line input and detects UTF-8 automatically. (3) Toggle URL-safe mode when the output is destined for a URL path or query string. (4) Copy the result. Encoding maps every 3 bytes to 4 Base64 characters with = padding to a multiple of four; decoding reverses it. Live conversion updates as you type, and invalid Base64 input is flagged instead of silently producing garbage.

Is Base64 Encryption or Encoding?

Encoding, never encryption — a distinction with security consequences. Base64 is a reversible mapping anyone can undo without any key; the string dXNlcm5hbWU6cGFzc3dvcmQ= decodes to username:password for anyone who pastes it anywhere. Real uses are transport-shaped: embedding binary in JSON or XML, data URLs, email MIME parts, and encoding credentials for HTTP headers where raw bytes are illegal. It is never appropriate for storing or transmitting secrets on its own — use AES for encryption, Argon2 or bcrypt for password hashing. This tool's URL-safe variant exists for the related practical need: standard Base64's + and / characters break URLs, so token systems swap them for - and _ with no padding.

Frequently Asked Questions

What is Base64 encoding and when should I use it?

Base64 converts binary data into ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It is used for embedding images in HTML/CSS as Data URLs, encoding API credentials in HTTP headers, transmitting binary data over text-only protocols like JSON, and storing small assets inline. This tool supports UTF-8 and URL-safe variants.

What is the difference between standard and URL-safe Base64?

Standard Base64 uses + and / which break URLs. URL-safe Base64 replaces them with - and _ so the output can be placed in URLs, query parameters, or filenames without encoding. This tool supports both variants—use URL-safe when the output goes into a URL path or query string.

Related tools

Joke of the Day
Sep 6

What do you call a crab that plays baseball?

100% Free, Forever

Keep Tools Free for Everyone

No paywalls, no signups, no data sold. Built by a solo developer who believes useful tools should be accessible to everyone.

Support me on Ko-fi— keep tools free

100% of proceeds go towards hosting & building more free tools.