Skip to main content

Base64 & URL Encode / Decode

Encode or decode Base64 and URL (percent-encoded) strings instantly. Fix broken query parameters and decode API payloads, right in your browser.

Input

Stays in your browser

Result

Encoded or decoded text will appear here.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to Base64URL & Base32 Converter, URL Parser or Text to Binary / ASCII.

Online Base64 & URL Encoder / Decoder

Base64 and URL encoding show up constantly in web development: embedding binary data in JSON or a data: URI, safely passing special characters in a URL query string, or reading an API token buried in an Authorization header. Switch between Encode and Decode and pick a format to convert instantly, entirely in your browser. For URL-safe Base64 and Base32 use the Base64URL & Base32 Converter. It helps when a request parameter, token fragment, or pasted value contains Base64 or percent-encoded text that needs inspection.

How to encode or decode Base64 and URL strings online

Choose Encode or Decode, pick a format (Base64 or URL), paste your text into the input box, and click the action button. The result appears below with a one-click copy button — there's no size limit beyond what your browser can comfortably handle, and nothing is uploaded anywhere in either direction.

Base64 vs. URL encoding — when to use each

Base64 converts arbitrary binary data into a text-safe string using only letters, digits, +, /, and = for padding — common for embedding images or files inside JSON, a data: URI, or an HTTP Authorization header. URL encoding (percent-encoding) instead replaces characters that have special meaning in a URL — spaces, &, ?, #, and others — with a percent sign followed by a hex code, so they can be safely included in a query string or path.

Common use cases

  • Decoding a JWT or Basic Auth token pulled from an HTTP header to inspect its contents
  • Encoding a file or image into a Base64 data URI for inline embedding
  • URL-encoding a value before building a query string by hand
  • Decoding a percent-encoded parameter from a shared link to see its original value

Worked example

Base64-encoding café (with the accented é) produces Y2Fmw6k=, not the shorter result you'd get from naively encoding one byte per character — this tool encodes the UTF-8 bytes first, so accented letters and emoji round-trip correctly instead of corrupting.

Common mistakes and edge cases

  • Decoding Base64 that isn't actually valid UTF-8 text (binary data, an image, a compressed file) doesn't error — it silently shows replacement characters (�) instead of the original bytes, since this tool decodes to text, not raw bytes.
  • Pasting a multi-line Base64 blob works — whitespace and line breaks are stripped before decoding — but stray characters outside the Base64 alphabet still fail with an explicit error rather than being silently ignored.
  • URL-decoding a string that isn't actually percent-encoded (or has a malformed % sequence, like a lone % at the end) fails with an explicit error instead of returning the input unchanged.

Frequently asked questions

What is Base64 encoding used for?
Base64 turns arbitrary binary data into a text-safe string using only letters, digits, +, /, and = — commonly used to embed images or files inside JSON, data: URIs, or email attachments, and to encode credentials or tokens in HTTP headers.
What is URL encoding (percent-encoding) used for?
URL encoding replaces characters that aren't safe in a URL (spaces, &, ?, #, and others) with a % followed by their hex code, so they can be safely included in a query string or path without being misinterpreted as part of the URL's structure.
Why did decoding my Base64 string fail?
The most common causes are an odd-length string, characters outside the Base64 alphabet, or a copy-paste that introduced extra whitespace or line breaks. This tool reports a decode error instead of silently returning garbage.
Is my data uploaded anywhere when I encode or decode it?
No — encoding and decoding use the browser's native TextEncoder, atob/btoa, and encodeURIComponent/decodeURIComponent functions entirely client-side. Nothing you type is ever sent to a server.
What happens if I decode Base64 that isn’t actually text?
It won't necessarily error. This tool decodes bytes as UTF-8 text using TextDecoder, which silently substitutes a � replacement character for any byte sequence that isn't valid UTF-8, rather than throwing. If your result is full of � characters, the Base64 was probably encoding binary data (an image, a key, a compressed file), not text.
Is Base64 the same as encryption?
No. Base64 and URL encoding only change how data is written, and anyone can reverse them without a key. They are used to carry binary data or special characters through systems that expect plain text. To keep something secret you need real encryption, such as the AES Encrypt tool, with a key only you know.

Related tools

More Security & Auth

View all Security & Auth tools →