Glyph WidgetsGlyph Widgets
ToolsAboutContactBlogPrivacyTermsRemove AdsSupport on Ko-fi

© 2026 Glyph Widgets LLC. All rights reserved.

·

100% Client-Side Processing

Developer
Text & Writing
Images & Colors
Media
Web & SEO
Utilities
Privacy & Security
Calculators
  1. Home
  2. Developer
  3. Encoding
  4. Base64 Encoder/Decoder

Base64 Encoder/Decoder

Last updated: March 5, 2026

Encode text to Base64 or decode Base64 strings instantly. Full Unicode support with URL-safe mode. All processing happens locally in your browser.

0 characters
0 characters
Share

Saved Presets is a Supporter feature.

Tool History is a Supporter feature.

Tool Notes is a Supporter feature.

Features

  • ▶Encode text to Base64
  • ▶Decode Base64 to text
  • ▶Full Unicode/UTF-8 support
  • ▶URL-safe Base64 mode
  • ▶Copy result to clipboard
  • ▶Download as text file
  • ▶Real-time conversion
  • ▶Swap and switch mode with one click
  • ▶100% client-side - your data never leaves your browser

How to Use This Tool

1

Choose Your Mode

Click "Encode" to convert plain text to Base64, or "Decode" to convert Base64 back to readable text. The tool remembers your selection.

2

Enter Your Input

Paste or type your content in the input field. For encoding, enter any text including Unicode characters. For decoding, enter a valid Base64 string.

3

Enable URL-Safe Mode (Optional)

Enable URL-safe mode before encoding if your output will be used in URLs. This replaces + with - and / with _, making it safe for query strings and paths.

4

Copy or Download

The result appears automatically as you type. Click "Copy" to copy to your clipboard, or "Download" to save as a file. Use "Swap" to quickly reverse the operation.

How Base64 Encoding Works

Base64 encoding converts binary data into a set of 64 printable ASCII characters. The algorithm groups input bytes into sets of 3 (24 bits), then splits them into 4 groups of 6 bits each. Each 6-bit value maps to one of 64 characters in the Base64 alphabet.

The Base64 Alphabet

A-Z (26 characters) for values 0-25. a-z (26 characters) for values 26-51. 0-9 (10 characters) for values 52-61. + for value 62 (or - in URL-safe mode). / for value 63 (or _ in URL-safe mode). = for padding when input length is not divisible by 3.

Unicode Support

Standard Base64 (btoa/atob) only handles ASCII. Our tool uses TextEncoder to convert Unicode text to UTF-8 bytes first, then encodes those bytes. For decoding, we reverse the process with TextDecoder, ensuring full Unicode support.

URL-Safe Mode

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 (RFC 4648) replaces these with - and _, and optionally removes padding. This allows Base64 strings to be used directly in URLs without percent-encoding.

Common Use Cases

Embedding images in HTML/CSS using data URIs. Encoding binary data in JSON or XML payloads. Transmitting files via text-based protocols. Encoding credentials for HTTP Basic Authentication. Storing binary data in text-only databases.

Limitations

Base64 increases data size by ~33%. Not suitable for encryption or security. Very large inputs may cause browser performance issues. Some special padding scenarios may require URL-safe mode.

Frequently Asked Questions

Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters. It uses 64 characters (A-Z, a-z, 0-9, + and /) plus = for padding. It's commonly used to embed binary data in text-based formats like JSON, XML, or HTML.

Related Tools

JWT Decoder

Decode and inspect JSON Web Tokens

JSON Formatter

Format and validate JSON data

XML Formatter

Format, beautify, and validate XML documents

YAML Formatter

Format, beautify, and validate YAML files