Guide

THE TOOLBOX / TEXT & ENCODING UTILITIES

Encode, decode,
get back to building.

Convert UTF-8 text with standard Base64, URL-safe Base64URL, or URI component encoding locally in your browser.

Ready when you are.

0 / 1,000,000 UTF-16 code units · 0 UTF-8 bytes

0 UTF-16 units · 0 UTF-8 bytes

Text and UTF-8 only via local Web Worker. Encoding is reversible and not encryption.

THE DETAILS

RFC 4648 Base64/Base64URL and RFC 3986 percent-encoding explained.

1. Step-by-Step Workflow

Select your format (Base64, Base64URL, or URL component), enter your text in the left panel, and click Encode text or Decode text. Use the swap action to move the output back into the input for round-trip testing, or copy the result with one click.

2. IETF RFC 4648 & UTF-8 Byte Safety

Compliant with IETF RFC 4648, input strings are first converted into a canonical UTF-8 byte stream via TextEncoder before 6-bit Base64 grouping. This avoids the classic JavaScript btoa() Latin-1 crash on emojis, CJK characters, and accented text.

3. Strict Padding & Alphabet Validation

Instead of silently ignoring invalid characters, the decoder validates that the input matches the selected alphabet (rejecting URL-unsafe +// when Base64URL is selected) and verifies valid UTF-8 byte sequences upon decoding.

4. Zero-Egress Privacy & Related Tools

HTTP Basic Auth strings (user:password), OAuth state tokens, and webhook payloads never leave your browser tab. Working with full URLs, JWTs, or HTML entities? Try the URL inspector, JWT decoder, and HTML entity formatter.

Encoding Alphabet & CLI Comparison Matrix

Encoding Scheme62nd & 63rd CharsPaddingTerminal / CLI Equivalent
Base64 (RFC 4648 §4)+ and /= requiredprintf "%s" "text" | base64
Base64URL (RFC 4648 §5)- and _Omitted on encodebase64 | tr '+/' '-_' | tr -d '='
URL Component (RFC 3986)%XX hex escapesN/Ajq -sRr @uri

Common Encoding Pitfalls & Troubleshooting

Encoding an Entire URL Instead of a Parameter

encodeURIComponent escapes colons and slashes (turning https:// into https%3A%2F%2F). Use URL component encoding on individual query parameter values, or use the URL inspector for full URLs.

33% Base64 Payload Expansion

Base64 encodes every 3 bytes (24 bits) of input into 4 ASCII characters (32 bits), increasing payload size by roughly 33% (plus = padding up to a multiple of 4).

Confusing Encoding with Encryption

Storing secrets in Base64 inside client bundles or Kubernetes ConfigMaps provides zero cryptographic protection. Use AES-256-GCM in the Web Crypto playground when encryption is required.

Invalid UTF-8 Byte Sequences on Decode

If a Base64 string contains binary data (such as a compressed archive or raw key bytes) rather than UTF-8 text, decoding it as UTF-8 text will be rejected so binary bytes are not silently corrupted with replacement characters.

Frequently Asked Questions

What is the difference between standard Base64 and Base64URL?

Defined in IETF RFC 4648, standard Base64 (Section 4) uses + and / as the 62nd and 63rd alphabet characters with = padding, which have special meanings in URLs and file paths. Base64URL (Section 5, used in JWTs and OAuth PKCE) replaces + with - and / with _ and omits trailing = padding when encoding.

Why does JavaScript btoa() fail on emojis and non-ASCII characters?

The legacy DOM window.btoa() function only accepts Latin-1 (ISO-8859-1) code units (0x00–0xFF) and throws an InvalidCharacterError on multi-byte Unicode characters. This tool encodes strings into UTF-8 bytes via TextEncoder first so emojis and international scripts round-trip cleanly.

Does Base64 encoding encrypt or secure sensitive strings?

No. Base64 is a public, reversible binary-to-text encoding scheme, not encryption. Anyone can decode a Base64 string instantly without a key. For confidentiality, use authenticated encryption in the Web Crypto playground.

Why does URL decoding treat a plus sign (+) differently from %20?

RFC 3986 URI component encoding represents spaces as %20 and treats + as a literal plus sign, whereas HTML form encoding (application/x-www-form-urlencoded) uses + for spaces. This tool follows strict RFC 3986 component rules via encodeURIComponent and decodeURIComponent.

Are my encoded credentials or Basic Auth strings kept 100% inside my browser?

Yes. All encoding and decoding execute locally inside a cancellable browser Web Worker with zero network calls or server logging.