Skip to content
MagicWebBox
Sign in

Base64 / URL encoder

Encode and decode text as Base64 or for URLs, accents included

Text

Result

Type the text to convert…

About this tool

This encoder converts text to Base64, Base64 URL or URL encoding, and back. Use it to build the value of a Basic authentication header, to read a Base64 string found in a config file or a log, or to prepare a query string parameter that contains spaces, accented letters or reserved characters such as & and =.

Text is first converted to UTF-8, so accented and non-Latin characters are encoded and restored correctly. The Base64 URL variant replaces + and / with - and _ and drops the = padding, as JWTs do. When decoding, both alphabets are accepted, with or without padding, and whitespace is ignored. The result updates as you type, with no button to press.

How to use it

  1. Pick a Format: Base64, Base64 URL (no = or +/) or URL encoding.
  2. Select “Encode” or “Decode”.
  3. Type or paste your text into the Text box: the result appears right away.
  4. Click “Copy”, or “Use result as input” to run it the other way.

Frequently asked questions

What is the difference between Base64 and Base64 URL?

Base64 URL uses - and _ instead of + and /, and removes the trailing = signs. The output can then go into a URL or a file name without being encoded again. It is the variant used by JSON Web Tokens.

Why does decoding show an error?

In Base64 mode, the error appears when the text contains characters outside the alphabet or when the decoded bytes are not valid UTF-8 text, for example an encoded image. In URL mode, it points to a malformed % sequence.

How are spaces and the + sign handled in URL mode?

When encoding, the tool uses encodeURIComponent: spaces become %20 and reserved characters such as & = ? / are encoded. When decoding, + signs are turned into spaces, as in data submitted by an HTML form.

Is my text sent to a server?

No. Encoding and decoding rely on built-in browser functions (TextEncoder, btoa, encodeURIComponent), with no network request. Only the selected format and direction are saved locally; the text you type is not stored.