Free tool

Base64, URL & Hash Toolkit

Encode and decode UTF-8 Base64, URL query strings, HTML entities, and Hex—and compute hardware-accelerated SHA-256, SHA-512, and HMAC webhook signatures offline via Web Crypto API.

Base64, URL & Hash Toolkit: the tool

Plain Text (UTF-8)66 bytes
Try:
Base64 Output88 bytes (+33%)
eyJzdWIiOiJ1c3JfOTkxMmEiLCJzY29wZSI6ImFkbWluOnJlYWQiLCJub3RlIjoiVVRGLTggUmVhZHkg8J+agCJ9

Implementing OAuth 2.0, webhook signature verification, or zero-trust API security?

DEESU engineers build hardened authentication flows, idempotent Stripe/GitHub webhook receivers, and encrypted backend services.

Secure Your APIs

How it works

UTF-8 Safe Base64 vs Standard Browser btoa() Pitfalls

JavaScript's legacy btoa() and atob() helpers only accept Latin-1 (ISO-8859-1) characters. The moment your string contains an emoji, curly quote, Euro symbol, or Arabic/CJK character, calling btoa() throws an InvalidCharacterError crash in production.

Our Base64 utility encodes strings through TextEncoder into canonical UTF-8 byte arrays before Base64 serialization, and decodes cleanly back through TextDecoder. It also supports RFC 4648 Section 5 Base64URL mode (- and _ instead of + and /, with trailing = padding stripped), which is mandatory for JSON Web Tokens (JWT), OAuth 2.0 PKCE code challenges, and URL-safe API cursors.

encodeURIComponent vs encodeURI: Avoiding Broken Query Parameters

Choosing the wrong JavaScript URL encoder is a frequent source of broken OAuth redirects and malformed webhook callbacks. Both functions serve distinct roles:

  • encodeURIComponent(): Encodes reserved URL characters including ?, &, =, /, and #. Always use this for individual query parameter values, redirect targets, or search terms.
  • encodeURI(): Preserves protocol and structural characters (https://, /, ?, &, =) while encoding spaces and non-ASCII characters. Use this only when encoding a complete URL.
  • Interactive Query String Inspection: Pasting a full URL into our parser breaks down protocol, host, path, fragment, and every decoded query parameter into a clean table for rapid debugging.

Computing SHA-256, SHA-512, and HMAC Signatures via Web Crypto API

Cryptographic digests and HMAC (Hash-based Message Authentication Code) signatures are the backbone of webhook verification for Stripe, GitHub, Shopify, and Slack. Instead of relying on slow or unmaintained JavaScript crypto polyfills, this toolkit invokes the browser's hardware-accelerated Web Crypto API (window.crypto.subtle.digest and crypto.subtle.sign).

By combining a raw request body with your webhook signing secret under HMAC-SHA256, you can reproduce exact X-Hub-Signature-256 or Stripe signature digests locally to debug signature mismatch errors without ever leaking secret keys to a remote server.

HTML Entity Escaping and Hex Encoding for Security Debugging

Properly escaping <, >, &, ", and ' into HTML entities prevents Cross-Site Scripting (XSS) when rendering untrusted strings in HTML emails, XML feeds, or server-rendered templates. Meanwhile, UTF-8 Hex conversion exposes exact raw byte sequences—making invisible zero-width spaces, smart quotes, or byte-order marks (BOM) immediately visible when troubleshooting serialization bugs.

FAQ

Questions, answered

Yes. All hashing and HMAC signing runs strictly inside your browser's native Web Crypto API (crypto.subtle) with zero network calls. Your payloads and secret keys never leave local memory.

Base64 maps every 3 binary bytes (24 bits) into 4 printable ASCII characters (6 bits each). That 4-to-3 expansion produces a ~33.3% size overhead, plus 1–2 = padding characters when byte length is not divisible by 3.

Standard Base64 includes +, /, and =, which have special meanings inside URLs and query strings. URL-Safe Base64 (Base64URL) replaces + with -, / with _, and strips = padding, making it safe for JWT segments, filenames, and query tokens.

No. SHA-1 is cryptographically broken against collision attacks and is included here only for legacy Git commit or checksum debugging. Use SHA-256 or SHA-512 for integrity checks/HMACs, and dedicated slow key-derivation functions like Argon2id or bcrypt for passwords.

The #1 cause of HMAC signature mismatches is verifying against a re-serialized JSON object instead of the exact raw UTF-8 HTTP request body bytes (whitespace, key order, and trailing newlines all change the digest).

More free tools

Reply within 1 business day

Tell us what you're building.

Send the problem, not a polished brief. We'll tell you what it actually takes to ship it: stack, timeline and cost, before you commit to anything.