Text & developer
Base64 and URL Encoder and Decoder
Turn text into Base64 or percent-encoded URL text, or turn it back. Unicode text such as accents, Arabic or emoji is handled as UTF-8, and Base64 can use the URL-safe alphabet. If the input is not valid, the tool explains what is wrong.
Loading tool…
Base64 is not encryption. Anyone can decode it, so do not use it to protect passwords or private data.
How to use the Base64 and URL Encoder
- Choose Base64 or URL, and Encode or Decode.
- Type or paste your text. The result updates as you type.
- For Base64, choose the standard or URL-safe alphabet and whether to keep the “=” padding. For URLs, choose how much to encode.
- Copy the result.
Tips for better results
- Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
- Use URL-safe Base64 (with - and _ instead of + and /) inside web addresses, tokens and file names.
- Use “component” mode to encode a single value such as a search word inside a link, and “whole address” mode to keep :// ? & = # readable.
Limitations you should know about
- This tool works on text. To turn an image into Base64, use the Image to Base64 tool. Decoded data that is not UTF-8 text (a file, for example) is reported but not shown.
- Base64 makes data about one third larger. URL encoding makes non-ASCII characters several times longer.
- URL encoding of a whole address does not check that the address is valid.
Frequently asked questions
What is Base64 used for?
It writes any data using only letters, digits and a few symbols, so it can travel safely through systems made for text, such as email, JSON and web addresses. It does not protect or compress the data.
What is URL encoding?
Also called percent-encoding. Characters that have a special meaning in a web address, or that are not plain ASCII, are written as % followed by two hexadecimal digits, for example a space becomes %20.
What is the difference between standard and URL-safe Base64?
URL-safe Base64 replaces + with - and / with _, so the text can sit in a web address without extra encoding. Padding with = is often left out.
Why do I get an error when decoding?
The input may contain characters that are not part of Base64, may be missing characters, or may decode to data that is not text. The message says which.
Guides that use this tool
Related tools
- Image to Base64 Turn an image into a Base64 data URI, an HTML img tag or a CSS background, and decode it back.
- JSON Formatter Format, validate, minify and sort JSON, with clear error messages that point to the line and column.
- Text Case Converter Change text to upper case, lower case, sentence case, title case, camelCase, snake_case, kebab-case and more.