Base64 & URL Encoder / Decoder
Encode and decode text to and from Base64 or URL-safe percent-encoding.
How the Base64 & URL Encoder works
Text is first converted to UTF-8 bytes so emoji and non-Latin characters encode correctly. Base64 then maps every 3 bytes to 4 characters from a 64-character alphabet; URL-safe Base64 swaps + and / for - and _ and can drop the = padding.
URL encoding percent-escapes every byte outside the unreserved set (A–Z, a–z, 0–9 and - _ . ~), which is what query strings and form submissions require.
Formulas used
- Base64 size
encoded length = 4 × ⌈bytes ÷ 3⌉
How to use the Base64 & URL Encoder in 3 steps
Step 1
Choose Base64 or URL encoding, and toggle the URL-safe alphabet for Base64 if needed.
Step 2
Type plain text in the left pane, or paste encoded text in the right pane.
Step 3
The other pane updates instantly; copy whichever side you need.
Frequently asked questions
Is Base64 a form of encryption?
No. Base64 is a reversible encoding that anyone can decode. Never use it to protect passwords or secrets; use real encryption instead.
When should I use URL-safe Base64?
Use it whenever the value appears in a URL, filename or JWT, because standard Base64 characters + and / have special meanings in URLs.
Related tools
- Text & Code FormatterPrettify and validate JSON and XML documents.
- Regex Tester & ExplainerTest regular expressions against sample text with live match highlighting and a token-by-token explanation.
- UUID & Password GeneratorGenerate v4 UUIDs and strong, customizable random passwords using your browser’s secure random source.