Base64 Encoder
Encode any text to standard Base64 in your browser, emoji and accented letters included.
Percent-encode a value so it can sit safely inside a URL. Spaces, ampersands, slashes and other special characters become %-codes, using the browser's encodeURIComponent.
Updated
Your browser is preparing the tool. It runs 100% locally.
Paste text and the tool percent-encodes it with the browser's encodeURIComponent. Spaces, slashes, ampersands, question marks and other special characters become %-codes, so they can travel inside a URL without breaking it. It encodes one piece, such as a query value, and not a whole URL: the slashes and colon of a full address get encoded too. Non-English letters become their UTF-8 %-bytes. The encoding happens in your browser.
Type or paste a value and you get its percent-encoded form, ready to drop into a query string or path segment. A space becomes %20, a slash becomes %2F and an ampersand becomes %26. Any character with a special meaning in a URL is replaced by a percent sign and its hex code, so the value cannot break the link it sits in.
It encodes a component, not a complete URL. It escapes the reserved characters that separate the parts of a URL (the slashes, colon, question mark and ampersand), so a whole address run through it has those separators encoded as well. That is what you want for a single value and wrong for a finished URL.
The tool runs your text through JavaScript's encodeURIComponent. That function leaves the unreserved characters alone: the letters A to Z, the digits, the hyphen, underscore, dot and tilde, plus the exclamation mark, apostrophe, parentheses and star. It percent-encodes everything else, including the reserved characters that structure a URL.
Characters outside ASCII are first converted to their UTF-8 bytes, and each byte is encoded separately. So an accented é becomes %C3%A9 (two bytes), and an emoji becomes four %-codes. Decoding reverses the process and reassembles the original character.
space → %20
slash → %2F
question mark → %3F
equals → %3D
ampersand → %26
accented é → %C3%A9 (UTF-8 bytes)a/b?c=d → a%2Fb%3Fc%3DdLetters, digits and the symbols hyphen, underscore, dot, tilde, exclamation mark, apostrophe, parentheses and star are left as they are. Everything else is percent-encoded. The input is treated as one value, not a whole URL.
A built-in JavaScript function encodes your text in your browser and sends nothing to a server, so values that contain private data can be encoded here.
Percent-encoding is not encryption. Anyone can reverse it, so use it to carry characters safely and not to keep anything secret.
| Method | encodeURIComponent (browser built-in) |
|---|---|
| Encodes | reserved characters, spaces, non-ASCII |
| Leaves alone | letters, digits, hyphen, underscore, dot, tilde, and ! ' ( ) * |
| Space becomes | %20 (not a plus sign) |
| Non-ASCII | UTF-8 bytes, each percent-encoded |
| Scope | one value or component, not a whole URL |
| Where it runs | In your browser; the text is not sent anywhere |
It encodes a single component, not a whole URL. Run a complete address like the home page of a site through it and the slashes and colon become %2F and %3A, which breaks the URL. Encode individual values (a search term, a parameter) and build the URL around them.
A space becomes %20, not a plus sign. HTML form submissions use a plus for a space in the query string; if you need that form, replace %20 with a plus yourself after encoding.
encodeURIComponent leaves a few sub-delimiters unencoded: the exclamation mark, apostrophe, parentheses and star, even though RFC 3986 lists them as reserved. Most systems accept this. If a strict parser needs them encoded, handle those characters separately.
Percent-encoding hides nothing, because anyone can decode it. Do not use it to protect passwords, tokens or other secrets.
Encoding the same text twice double-encodes it: a percent sign from the first pass becomes %25 on the second. Encode once, and decode the matching number of times.
Encode a search term or value before adding it to a URL.
Safely place user input into a path segment or query string.
Encode a redirect or campaign value carried inside another URL.
See how a value will look once it is encoded in a request.
Encoding a complete, well-formed URL? encodeURI, a whole-URL encoder, leaves the separators intact. Need the plus-for-space form? Swap %20 for a plus after encoding. To reverse the process, use the URL decoder.
Built on the browser's encodeURIComponent. Unreserved characters and five sub-delimiters (exclamation mark, apostrophe, parentheses, star) pass through unchanged, and everything else is percent-encoded. The page states plainly that it encodes one value and not a whole URL, that a space becomes %20 and not a plus, and that the encoding is reversible and is not encryption.
Encode any text to standard Base64 in your browser, emoji and accented letters included.
Paste messy or minified JSON and get it back pretty-printed with 2-space indentation. The same step tells you whether the JSON is valid.
Turn percent-encoded text back into readable characters: %20 becomes a space and %26 an ampersand. It uses the browser's decodeURIComponent.
Get the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text at once, updated as you type, with a plain note on which ones are still safe for security work.
Generate up to 500 random version 4 UUIDs at once, the 128-bit identifiers used for database keys, from your browser's secure random generator.
Decode Base64 back to readable text in your browser, Unicode included, and get a plain error message when the input is broken.
Paste or pick your input at the top of the page. The conversion runs on this device and needs no account.