URL Encoder & Decoder
Encode text for safe use in URLs, or decode percent-encoded URLs back into readable text. Handles Unicode correctly and offers both component and full-URL modes.
- Files never leave your device
- Free, no signup
- No watermarks
- Works offline once loaded
How to url encoder & decoder
- 1
Choose a direction
Encode text for a URL, or decode an encoded URL back to text.
- 2
Pick the mode
Component mode escapes everything; full-URL mode preserves the structure.
- 3
Copy the result
Results update as you type.
Why a URL cannot just contain arbitrary characters
A URL's structure relies on specific characters — `/` to separate path segments, `?` to introduce the query string, `&` to separate parameters, `#` for a fragment — carrying fixed structural meaning wherever they appear. If a value being placed inside a URL, such as a search term or a user's name, happens to contain one of those same characters literally, there has to be some way to distinguish "this ampersand is part of the actual value" from "this ampersand separates two query parameters." Percent-encoding is that mechanism: any character with structural meaning, when it needs to appear as literal data rather than as structure, gets replaced with a `%` followed by its hexadecimal byte value, so `&` becomes `%26` and unambiguously reads as data rather than as a parameter separator.
The bug that breaks more URLs than any other
The single most common URL-encoding mistake is encoding an entire assembled URL with the wrong function — using `encodeURIComponent`, which escapes every reserved character including `/`, `:`, `&` and `?`, on a complete address rather than on one individual value. The `://` after the protocol becomes `%3A%2F%2F`, every `&` separating query parameters becomes `%26`, and the URL stops being a URL at all — it becomes one long encoded string with no structure a server can parse. The correct approach is the reverse order: encode each individual value first — the search term, the redirect target, whatever the actual data is — and only then insert those already-encoded values into the surrounding URL structure, never re-encoding the assembled whole afterwards.
This is exactly why this tool offers two distinct modes rather than one generic "encode" button: component mode for encoding a single value that is about to become part of a URL, and full-URL mode for the rarer case of encoding an entire address while deliberately preserving its structural characters.
Why a space sometimes becomes %20 and sometimes a plus sign
Two different encoding conventions for spaces both remain in active use today, and they are not interchangeable. Percent-encoding, the general-purpose standard, represents a space as `%20` and is valid anywhere in a URL — the path, the query string, everywhere. The `+` convention for a space comes from an older, narrower standard specifically for HTML form submissions using the `application/x-www-form-urlencoded` content type, and it is only valid inside the query string; a literal `+` appearing in a URL path is not interpreted as a space at all, it is just the character plus. This tool always produces `%20`, which is valid in every context, and correctly decodes both forms when reading an encoded URL back.
Where this matters beyond browsers
Percent-encoding rules apply to any URL regardless of what constructs or consumes it — a webhook payload built by a backend service, a deep link opened by a mobile app, an API request assembled by a script. Anywhere a value that might contain spaces, ampersands, or non-ASCII characters gets interpolated into a URL string, the same encode-the-value-before-inserting-it rule applies, which is why this is as much a backend and scripting concern as a browser one.
Frequently asked questions
What is the difference between component and full-URL mode?
Component mode (`encodeURIComponent`) escapes everything including / ? & = #, which is what you want for a single query-parameter value. Full-URL mode (`encodeURI`) leaves those structural characters intact so an entire address stays usable. Using the wrong one is the most common URL-encoding bug.
Why did my URL break when I encoded the whole thing?
You almost certainly used component mode on a complete URL, which escaped the `://` and the `&` separators. Encode each parameter *value* individually, then assemble the URL — do not encode the assembled result.
Why does a space sometimes become %20 and sometimes +?
Percent-encoding uses %20. The `+` form comes from the older HTML form encoding (`application/x-www-form-urlencoded`) and is only valid in a query string, never in a path. This tool produces %20, and decodes both.
How are emoji and non-English characters handled?
They are encoded as UTF-8 bytes, so é becomes %C3%A9 and an emoji becomes four percent-escapes. That is the correct behaviour and round-trips exactly.
Common url encoder & decoder tasks
You might also need
Base64 Encoder & Decoder
Encode and decode Base64 and Base64URL
JSON Formatter
Format, validate and minify JSON instantly
Hash Generator
MD5, SHA-1, SHA-256, SHA-384 and SHA-512
CSS Formatter
Beautify or minify stylesheets
CSS Minifier
Shrink stylesheets with a real CSS-aware minifier
HTML Formatter
Beautify and indent HTML properly
JavaScript Formatter
Format JS and TypeScript with a real parser
JS Minifier
Shrink JavaScript with real minification, not regex