27 September 2026

Base64 & URL Encoder

Encode and decode Base64, Base64URL and URLs in one place

Base64 and URL Encoder Decoder - encode and decode text online
The Base64 & URL Encoder / Decoder converts text to and from the four encodings developers run into most: Base64, Base64URL, URL components and full URLs. It handles accented letters, emoji and non-Latin scripts correctly, and can turn any file into a Base64 data URL.

What Is Base64?

Base64 represents any data, including images and other binary files, using only 64 safe characters: A to Z, a to z, 0 to 9, + and /, with = as padding. That lets binary data travel through systems built for text, such as JSON, email and HTML. The trade-off is size: Base64 output is about 33% larger than the input. Base64 is an encoding, not encryption. Anyone can decode it.

What Is URL Encoding?

URLs can only contain a limited set of characters. URL encoding, also called percent encoding, replaces everything else with a % followed by two hex digits. A space becomes %20 and é becomes %C3%A9. Without it, a value containing & or ? would break the URL it is placed in.

Choosing the Right Format

  • Base64: Embedding images in CSS or HTML, sending files in JSON, and email attachments
  • Base64URL: JWTs, API tokens and anything placed in a URL. It swaps + and / for - and _ and drops the = padding
  • URL (component): A single query value, such as the search term in ?q=. Encodes &, =, / and ? too
  • URL (full address): A complete link. Keeps ://, /, ? and & intact and only encodes spaces and other unsafe characters

How to Use the Encoder

Step 1: Choose a Format

Select Base64, Base64URL, URL (component) or URL (full address) from the Format menu.

Step 2: Enter Your Text

Type or paste into the Input box. When decoding Base64, you don't need to clean it up first: line breaks, missing = padding and Base64URL characters are all accepted.

Step 3: Encode or Decode

Click Encode or Decode. The result appears in the Output box, and the status line shows the length before and after. If the input can't be decoded, for example a lone % or Base64 that contains binary data rather than text, you get a clear message instead of garbled output.

Step 4: Swap, Copy or Start Over

Swap moves the output back into the input, which is handy for checking a round trip or decoding something twice. Copy output puts the result on your clipboard, and Clear resets everything.

Converting a File to Base64

Click "File to Base64" and choose a file up to 10 MB. You get a complete data URL such as data:image/png;base64,..., ready to paste into an <img> tag, a CSS url() or a JSON payload.

Tips

  • Never treat Base64 as a way to hide passwords or secrets. It is trivially reversible
  • Only inline small images as Base64. Large ones make pages heavier than a normal image file
  • Encode each query value separately with URL (component), then join them with &
  • In form data, + means a space. The component decoder handles this for you

Privacy

Encoding and decoding happen entirely in your browser. Tokens, files and text you paste are never uploaded.

Conclusion

One tool covers all four encodings, with correct Unicode handling and forgiving decoding. Try it at tools.typinks.com/base64-url-encoder.

Need to Encode Something?

Pick a format, paste your text and get the result instantly.

Launch Encoder