Encoders & Decoders
URL Encoder / Decoder
Percent-encode or decode URLs and query parameters.
Frequently Asked Questions & Guide
How to use this URL Encoder / Decoder
- Toggle between Encode and Decode at the top.
- Toggle the use encodeURIComponent checkbox to choose between full encoding (encodes
/,?,=,&) and the gentlerencodeURI(preserves URL structural characters). - Paste your text or URL into the input box. Conversion happens live.
- Copy the result with Copy, or swap input and output with Swap.
This tool uses the browser's native encodeURIComponent and decodeURIComponent functions, which implement RFC 3986 percent-encoding. UTF-8 characters are encoded correctly out of the box — Cyrillic, CJK, emoji, and right-to-left scripts all work.
What is URL Encoding?
URL encoding (also called percent encoding) is the mechanism by which characters that are not allowed in a URL — spaces, non-ASCII characters, and reserved characters like ?, &, =, # — are represented as a percent sign followed by two hex digits. The encoding scheme is defined in RFC 3986 and is what makes it possible to pass arbitrary data through URLs.
JavaScript provides two pairs of functions for URL encoding:
encodeURI/decodeURI— encodes a complete URL, but preserves URL-structural characters like:/?#&=+. Use this when you have a full URL that you want to make safe without breaking its structure.encodeURIComponent/decodeURIComponent— encodes everything, including URL-structural characters. Use this when encoding a single query parameter value or path segment that will be inserted into a larger URL.
Picking the wrong one is a common source of bugs. If you encode https://example.com with encodeURIComponent, you'll get https%3A%2F%2Fexample.com — broken as a URL. The checkbox in this tool lets you switch between the two so you can see the difference.
What's the difference between percent-encoding and Base64?
Percent encoding is for making arbitrary text safe inside a URL. It only encodes characters that need encoding — ASCII letters, digits, and a few safe symbols are passed through unchanged. Base64 encodes binary data as ASCII characters and always inflates the input by 33%. They serve different purposes.
Does it handle Unicode correctly?
Yes. Modern browsers' encodeURIComponent functions encode Unicode characters as their UTF-8 byte sequence, percent-encoded. For example, the emoji 🌍 becomes %F0%9F%8C%8D. This matches what every modern web server expects.
What about the + for space in form data?
HTML form application/x-www-form-urlencoded encoding uses + for spaces, which is a legacy from the CGI era. Standard URL encoding uses %20. This tool uses the standard form. If you need +-for-space encoding, replace %20 with + in the output.
Is my data sent to a server?
No. Everything happens in your browser using native functions. Your input never leaves your device.