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 browserResult
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.