Base64 Encoder and Decoder
Encode text or any file to Base64 and decode it back, with full UTF-8 support, URL-safe output, and data URIs.
Runs in your browser. Your input stays on your device.
Percent-encode text so it is safe to put in a URL, or decode %XX sequences back into readable text. Decoding a complete URL also shows its parts and query parameters.
Opens a file from your device. The file is read in your browser and is not uploaded.
Showing a large file in the editor can make the page slow or unresponsive for several seconds.
0 characters · 0 B
0 characters · 0 B
Privacy: This tool runs in your browser. Your input is processed on your device and is never uploaded to a server.
A query value encoded in Component mode. Note that &, =, %, and ? are all escaped.
café & crème brûlée = 100% delicious?caf%C3%A9%20%26%20cr%C3%A8me%20br%C3%BBl%C3%A9e%20%3D%20100%25%20delicious%3FUse Component for one piece that goes inside a URL, such as a search term or a query parameter value. It escapes &, =, ?, /, and #, so the value cannot break the URL around it. Use Full URL when you already have a complete address that contains spaces or non-English characters and you want it to stay a working URL, with its slashes, question mark, and ampersands left alone.
HTML forms sent as application/x-www-form-urlencoded write spaces as +. Everywhere else in a URL, + is a literal plus sign and a space is %20. Turn on Treat + as a space only when decoding form submissions or query strings produced that way; otherwise a real plus sign would turn into a space.
Every % in an encoded URL must be followed by two hexadecimal digits, and the bytes those digits spell out must form valid UTF-8. A lone % (as in "50% off"), something like %G1, or a multi-byte character cut short, such as %E2%82, cannot be decoded. The error gives the position so you can fix it; a literal percent sign is written %25.
Each character is converted to its UTF-8 bytes, and every byte is written as % followed by two hex digits. For example, é becomes %C3%A9 and the Chinese character 你 becomes %E4%BD%A0. Decoding reverses the process exactly.
Encode text or any file to Base64 and decode it back, with full UTF-8 support, URL-safe output, and data URIs.
Decode JSON Web Tokens in your browser: header, payload, and claims with expiry times, plus warnings for risky tokens.