Base64 Encoder / Decoder
Encode/decode base64 (and base64url).
URWISH Base64 Tool encodes and decodes Base64 entirely on-device. It’s useful for developer workflows like inspecting tokens, embedding small payloads, and converting text safely between systems.
Choose between base64 and base64url (the URL-safe variant commonly used in JWTs).
How Base64 works
Base64 is an encoding that turns bytes into ASCII characters so they can travel through systems that expect text.
When encoding text, URWISH first converts your input string to UTF‑8 bytes, then Base64-encodes those bytes. Decoding reverses the process.
- Text → UTF‑8 bytes → Base64 text
- Base64 text → bytes → UTF‑8 text
Base64 vs Base64URL
Base64URL is a URL-safe variant. It replaces "+" and "/" with "-" and "_" and typically omits "=" padding.
Use base64url for JWT header/payload segments and URL contexts.
- base64: uses + and / and usually includes = padding
- base64url: uses - and _ and often removes padding
Common use cases
This tool is ideal for quick copy/paste workflows. For files and images, use the dedicated file/image Base64 tools.
- Decode JWT segments (header/payload) safely on-device
- Encode JSON snippets for embedding in configs
- Convert between base64 and base64url variants
- Debug encoding problems caused by whitespace or padding
Tips and pitfalls
Base64 increases size — roughly 4 characters for every 3 bytes (about 33% overhead). That’s normal.
If decoding fails, check for line breaks, invalid characters, or missing padding in base64 mode.
- If you’re working with JWTs, base64url is the correct choice
- If you need an image Data URL, use Image → Base64
- For binary blobs larger than a few MB, Base64 is usually not ideal
FAQ
Does URWISH upload my input?
No. Encoding/decoding happens locally in your browser.
What is base64url used for?
It’s commonly used in URLs and tokens like JWT, because it avoids characters that need escaping.
Can I encode files with this tool?
This tool focuses on text. For files/images, use Image → Base64 or Base64 → Image for safer workflows.
Why does Base64 make data bigger?
It encodes binary bytes into ASCII text, which adds overhead by design.
Does it work offline?
Yes, after the page is loaded (and best when installed as a PWA).