Base64 and URL encoder

Free

Online Base64 encoder, file to Base64 and URL encode/decode. Free.

Input

Max 2 MB. Base64 encode only.

Result

Method—
Input0
Output0

How this Base64 and URL encoder works

Encode turns text or a file into Base64, or a URL into a safe string. Decode reverses it, including data URIs. Everything runs in the browser.

URL-safe Base64 replaces + and / with - and _ and drops padding. That is how JWT header and payload look. Query-value encoding encodes everything; full-address encoding keeps : / ? #.

Base64 Text or file

Standard, URL-safe (JWT) or a data URI from a file.

URL Text ↔ %20

Query value (everything encoded) or full address (scheme kept).

Reverse Encode and decode

Both directions work. Swap moves the result back into the input.

Important: Base64 is not encryption. Anyone can decode the text. Do not paste secrets you want to keep private.

Useful notes

  •   “Hello, world!” in Base64 is SGVsbG8sIHdvcmxkIQ==. The decode sample uses it.
  •   URL-safe Base64 is the JWT form: no =, and - _ instead of + /.
  •   Query-value encoding turns a space into %20 and decodes + as a space. Full-address encoding leaves https:// and / alone.
  •   A data URI (data:image/png;base64,…) is decoded automatically. Binary files are downloaded, not shown as text.
  •   Nothing is saved on the server. Reloading the page clears the fields.